本文整理匯總了C#中System.Data.DataTable.Clear方法的典型用法代碼示例。如果您正苦於以下問題:C# DataTable.Clear方法的具體用法?C# DataTable.Clear怎麽用?C# DataTable.Clear使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Data.DataTable
的用法示例。
在下文中一共展示了DataTable.Clear方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: DajPonudu
public void DajPonudu(DataTable ponuda, Int32 ponuda_ID)
{
SqlConnection _konekcijaSqlConnection = new SqlConnection();
using (_konekcijaSqlConnection = Konekcija.DajKonekciju())
{
SqlDataAdapter _dajPonuduSQLDataAdapter = new SqlDataAdapter();
SqlCommand _dajPoslednjuPonuduSqlCommand = new SqlCommand("SELECT * FROM vwPonudaZaglavlje where Ponuda_ID = " + ponuda_ID, _konekcijaSqlConnection);
_dajPonuduSQLDataAdapter.SelectCommand = _dajPoslednjuPonuduSqlCommand;
//isprazni tabelu
ponuda.Clear();
try
{
//napuni tabelu
_dajPonuduSQLDataAdapter.Fill(ponuda);
}
catch (Exception)
{
throw;
}
}
}
示例2: LoadData
public void LoadData()
{
//string mid = Session["Mid"].ToString();
string mid = "930251337";
SqlDataAdapter da = new SqlDataAdapter("", connection);
DataTable dt = new DataTable();
da.SelectCommand.CommandText = "SELECT * FROM MemberList WHERE Mid = @mid";
da.SelectCommand.Parameters.AddWithValue("@mid", mid);
da.Fill(dt);
if (dt.Rows[0]["ImageExtention"].ToString().Length != 0)
{
imgProfile.ImageUrl = dt.Rows[0]["Image"].ToString() + dt.Rows[0]["ImageExtention"].ToString();
}
lblFullNameUP.Text = dt.Rows[0]["FullName"].ToString();
lblMembershipStatusUP.Text = dt.Rows[0]["Status_ID"].ToString();
lblFieldUP.Text = dt.Rows[0]["Title"].ToString();
lblBioUP.Text = dt.Rows[0]["Bio"].ToString();
if (dt.Rows[0]["Github"].ToString().Length == 0)
github.Visible = false;
else
{
lblgithub.Text ='/' + dt.Rows[0]["Github"].ToString();
github.HRef = "https://github.com/" + dt.Rows[0]["Github"].ToString();
}
if (dt.Rows[0]["Linkedin"].ToString().Length == 0)
linkedin.Visible = false;
else
{
lblLinkedin.Text ='/' + dt.Rows[0]["Linkedin"].ToString();
//linkedin.HRef = "https://Linkedin.com/" + dt.Rows[0]["Linkedin"].ToString();
}
if (dt.Rows[0]["Twitter"].ToString().Length == 0)
twitter.Visible = false;
else
{
lblTwitter.Text ='/' + dt.Rows[0]["Twitter"].ToString();
//twitter.HRef = "https://Twitter.com/" + dt.Rows[0]["Twitter"].ToString();
}
lblFirstName.Text = dt.Rows[0]["FirstName"].ToString();
lblLastName.Text = dt.Rows[0]["LastName"].ToString();
lblField.Text = dt.Rows[0]["Title"].ToString();
lblPhone1.Text = dt.Rows[0]["PhoneNumber"].ToString();
lblPhone2.Text = dt.Rows[0]["AltPhoneNumber"].ToString();
lblEmail.Text = dt.Rows[0]["Email"].ToString();
lblNationalID.Text = dt.Rows[0]["NationalID"].ToString();
lblStudentID.Text = dt.Rows[0]["Mid"].ToString();
da.SelectCommand.Parameters.Clear();
dt.Clear();
da.SelectCommand.CommandText = "SELECT * FROM MemberSkillList WHERE Member_ID = @mid2";
da.SelectCommand.Parameters.AddWithValue("@mid2", mid);
da.Fill(dt);
dlSkills.DataSource = dt;
dlSkills.DataBind();
da.SelectCommand.Parameters.Clear();
dt.Clear();
}
示例3: GetQuestions
public static void GetQuestions(string subject)
{
List<Q1> list = BussDAL.GetQuestions(subject);
if (list != null && list.Count > 0)
{
DataTable tmp = new DataTable("mfg_t_secque2");
tmp.Columns.Add("f_secid", typeof(int));
tmp.Columns.Add("f_qid", typeof(int));
tmp.Columns.Add("f_state", typeof(short));
tmp.Columns.Add("f_subject", typeof(string));
foreach (Q1 item in list)
{
DataRow dr = tmp.NewRow();
dr["f_secid"] = item.f_mainsec;
dr["f_qid"] = item.f_id;
dr["f_state"] = 1;
dr["f_subject"] = item.f_subject;
tmp.Rows.Add(dr);
string[] array = item.f_secorder.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
if (array.Length > 1)
{
//有從知識點
foreach (string csec in array)
{
int _sec = int.Parse(csec);
if (_sec != item.f_mainsec)
{
DataRow _dr = tmp.NewRow();
_dr["f_secid"] = _sec;
_dr["f_qid"] = item.f_id;
_dr["f_state"] = 0;
_dr["f_subject"] = item.f_subject;
tmp.Rows.Add(_dr);
}
}
}
if (tmp.Rows.Count >= 30000)
{
int total = MySqlHelper.BulkInsert(tmp, DataBase.CResourceKF);
if (total > 0 && total == tmp.Rows.Count)
{
Console.WriteLine("[{0}] {1}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "1111入庫");
tmp.Clear();
}
}
}
if (tmp.Rows.Count > 0)
{
int total = MySqlHelper.BulkInsert(tmp, DataBase.CResourceKF);
if (total > 0 && total == tmp.Rows.Count)
{
Console.WriteLine("[{0}] {1}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "入庫");
tmp.Clear();
}
}
}
}
示例4: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
AdminPopedom.IsHoldModel("04");
DataTable sdt = new DataTable();
string sqlt = "select NameID,ComName from TGameNameInfo where Enable=1 ";
sdt = DbSession.Default.FromSql( sqlt ).ToDataTable(); //sqlconn.sqlReader(sqlt);
if (sdt.Rows.Count > 0)
{
GameLists.DataSource = sdt;
GameLists.DataBind();
}
else
this.NoGameList.Visible = true;
sdt.Clear();
ids = CommonManager.Web.Request( "id", "" ); //Limit.editCharacter(Limit.getFormValue("id"));
if (ids.ToString() == "") ids = "1001";
if (ids != "")
{
DataTable sd2 = new DataTable();
string sql2 = "select ComName from TGameNameInfo where NameID=" + ids + "";
//Response.Write(sql2 + "<br>");
sd2 = DbSession.Default.FromSql( sql2 ).ToDataTable(); //sqlconn.sqlReader(sql2);
if( sd2.Rows.Count > 0 )
{
this.ComName = sd2.Rows[0]["ComName"].ToString();
}
else
{
//Limit.outMsgBox( "溫馨提示:\\n\\n 暫無任何記錄!", true );
CommonManager.Web.RegJs( this, "alert('暫無任何記錄。');", false );
return;
}
}
else
{
CommonManager.Web.RegJs( this, "alert('參數傳遞錯誤。');", false );
return;
}
sdt.Clear();
DataTable sd = new DataTable();
//string sqlActive = "select top 30 u.name as name,r.win as win,r.lost as lost,r.cut as cut,r.PlayTimeCount as PlayTimeCount";
//sqlActive = sqlActive + ",r.OnLineTimeCount as OnLineTimeCount,r.point as point from " + SearchTable + " as r,Users as u where u.userid=r.userid order by point desc";
string sqlActive = "select * from Web_VMatchTable where Nameid=" + ids + "";
//Response.Write(sqlActive);
sd = DbSession.Default.FromSql( sqlActive ).ToDataTable(); //sqlconn.sqlReader(sqlActive);
//Response.End();
if (sd.Rows.Count > 0)
{
ListsInfo.DataSource = sd;
ListsInfo.DataBind();
}
else
this.NoList.Visible = true;
sd.Clear();
}
示例5: StartupDataBaseChecker
//Startup checker
public static bool StartupDataBaseChecker(DBQueres DataWriter, DatabaseRead DataReader, MysqlRowCounter TableRowCounter)
{
try
{
DataTable errorCodeDataTable = new DataTable();
errorCodeDataTable = DataReader(string.Format("SELECT * FROM {0} WHERE {1}={2} AND {3}='Profit'", thisDataSet.ThisTables[16][0], thisDataSet.ThisColumn[0][0],AccountingVariables.PETUNIA_DATE, thisDataSet.ThisColumn[1][0]));
if (errorCodeDataTable.Rows.Count.Equals(0))
{
DataWriter(string.Format("INSERT INRO {0} VALUES('{1}','Profit',0,0,0,0", thisDataSet.ThisTables[16][0], AccountingVariables.PETUNIA_DATE));
}
errorCodeDataTable.Clear();
errorCodeDataTable = DataReader(string.Format("SELECT * FROM {0} WHERE {1}={2} AND {3}='Salary'", thisDataSet.ThisTables[16][0], thisDataSet.ThisColumn[0][0], AccountingVariables.PETUNIA_DATE, thisDataSet.ThisColumn[1][0]));
if (errorCodeDataTable.Rows.Count.Equals(0))
{
DataWriter(string.Format("INSERT INRO {0} VALUES('{1}','Salary',0,0,0,0", thisDataSet.ThisTables[16][0], AccountingVariables.PETUNIA_DATE));
}
errorCodeDataTable.Clear();
errorCodeDataTable = DataReader(string.Format("SELECT * FROM {0} WHERE {1}={2} AND {3}='Rent'", thisDataSet.ThisTables[16][0], thisDataSet.ThisColumn[0][0], AccountingVariables.PETUNIA_DATE, thisDataSet.ThisColumn[1][0]));
if (errorCodeDataTable.Rows.Count.Equals(0))
{
DataWriter(string.Format("INSERT INRO {0} VALUES('{1}','Rent',0,0,0,0", thisDataSet.ThisTables[16][0], AccountingVariables.PETUNIA_DATE));
}
errorCodeDataTable.Clear();
errorCodeDataTable = DataReader(string.Format("SELECT * FROM {0} WHERE {1}={2} AND {3}='OfficeExpance'", thisDataSet.ThisTables[16][0], thisDataSet.ThisColumn[0][0], AccountingVariables.PETUNIA_DATE, thisDataSet.ThisColumn[1][0]));
if (errorCodeDataTable.Rows.Count.Equals(0))
{
DataWriter(string.Format("INSERT INRO {0} VALUES('{1}','OfficeExpance',0,0,0,0", thisDataSet.ThisTables[16][0], AccountingVariables.PETUNIA_DATE));
}
errorCodeDataTable.Clear();
errorCodeDataTable = DataReader(string.Format("SELECT * FROM {0} WHERE {1}='{2}' AND {3}='Stationary'", thisDataSet.ThisTables[16][0], thisDataSet.ThisColumn[0][0], AccountingVariables.PETUNIA_DATE, thisDataSet.ThisColumn[1][0]));
if (errorCodeDataTable.Rows.Count.Equals(0))
{
DataWriter(string.Format("INSERT INRO {0} VALUES('{1}','Stationary',0,0,0,0", thisDataSet.ThisTables[16][0], AccountingVariables.PETUNIA_DATE));
}
errorCodeDataTable.Clear();
errorCodeDataTable = DataReader(string.Format("SELECT * FROM {0} WHERE {1}={2} AND {3}='Others'", thisDataSet.ThisTables[16][0], thisDataSet.ThisColumn[0][0], AccountingVariables.PETUNIA_DATE, thisDataSet.ThisColumn[1][0]));
if (errorCodeDataTable.Rows.Count.Equals(0))
{
DataWriter(string.Format("INSERT INRO {0} VALUES('{1}','Others',0,0,0,0", thisDataSet.ThisTables[16][0], AccountingVariables.PETUNIA_DATE));
}
errorCodeDataTable.Clear();
errorCodeDataTable = DataReader(string.Format("SELECT * FROM {0} WHERE {1}='{2}'", thisDataSet.ThisTables[6][0], thisDataSet.ThisColumn[0][0], AccountingVariables.PETUNIA_DATE));
if (errorCodeDataTable.Rows.Count.Equals(0))
{
DataWriter(string.Format("INSERT INTO {0} VALUES ('{1}',0,0,0,0,0)", thisDataSet.ThisTables[6][0], AccountingVariables.PETUNIA_DATE));
}
return true;
}
catch (Exception)
{
return false;
}
}
示例6: BindData
protected void BindData()
{
DataTable dt = new DataTable();
string type = CommonManager.Web.Request( "type", "" );
if( CommonManager.String.IsInteger( type ) && type.Equals( "0" ) )
{
//Award
dt = member.GetGameNameForAward();
if( dt.Rows.Count > 0 )
{
for( int i = 0; i < dt.Rows.Count; i++ )
listLeft.Items.Add( new ListItem( dt.Rows[i]["ComName"].ToString(), dt.Rows[i]["NameID"].ToString() ) );
}
dt.Clear();
//
dt = member.GetFilterGameNameForAward();
if( dt.Rows.Count > 0 )
{
for( int i = 0; i < dt.Rows.Count; i++ )
listRight.Items.Add( new ListItem( dt.Rows[i]["ComName"].ToString(), dt.Rows[i]["NameID"].ToString() ) );
}
dt.Clear();
this.map.Style.Add("display", "block");
}
if( CommonManager.String.IsInteger( type ) && type.Equals( "1" ) )
{
//extent
dt = member.GetGameNameForExtent();
if( dt.Rows.Count > 0 )
{
for( int i = 0; i < dt.Rows.Count; i++ )
listLeft.Items.Add( new ListItem( dt.Rows[i]["ComName"].ToString(), dt.Rows[i]["NameID"].ToString() ) );
}
dt.Clear();
//
dt = member.GetFilterGameNameForExtent();
if( dt.Rows.Count > 0 )
{
for( int i = 0; i < dt.Rows.Count; i++ )
listRight.Items.Add( new ListItem( dt.Rows[i]["ComName"].ToString(), dt.Rows[i]["NameID"].ToString() ) );
}
dt.Clear();
this.map.Style.Add("display", "block");
}
}
示例7: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
string ls_docids="";
string ls_filepath="";
if (this.Request.QueryString["docids"] != null)
{
ls_docids = this.Request.QueryString["docids"].ToString();
}
string[] lv_docids;
lv_docids = ls_docids.Split(',');
HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
DataTable dt = new DataTable();
for (int j = 0; j < lv_docids.Length; j++)
{
dt = Hyoa_fileatt.Getfileatt(lv_docids[j]);
if (dt.Rows[0]["hy_userid"].ToString() == Session["hyuid"].ToString() || Hyoa_global.isHaveRole("Role9995", Session["hyuid"].ToString()))
{
ls_filepath = Server.MapPath("~/") + dt.Rows[0]["hy_filepath"].ToString();
//this.Response.Write(ls_filepath);
//return;
if (File.Exists(ls_filepath))
{
System.IO.File.Delete(ls_filepath);
}
Hyoa_fileatt.ID = lv_docids[j];
Hyoa_fileatt.Delete();
}
dt.Clear();
}
this.Response.Write("aaa");
return ;
}
示例8: PesquisaGridView
public DataTable PesquisaGridView(string sCampos, string sWhere)
{
try
{
DataTable dt = new DataTable();
string sQuery = "Select "
+ sCampos
+ " from conhecim c inner join remetent r on c.cd_remetent = r.cd_remetent"
+ " Where " + sWhere;
FbDataAdapter da = new FbDataAdapter(sQuery, cx.get_Conexao());
dt.Clear();
cx.Open_Conexao();
da.Fill(dt);
da.Dispose();
return dt;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cx.Close_Conexao();
}
}
示例9: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
AdminPopedom.IsHoldModel("04");
string beginTime, EndTime, IPS, DayCount,Mac;
beginTime = CommonManager.Web.Request("tt",""); //Limit.editCharacter(Limit.getFormValue("tt"));
EndTime = CommonManager.Web.Request( "nn", "" ); //Limit.editCharacter(Limit.getFormValue("nn"));
IPS = CommonManager.Web.Request( "ip", "" ); //Limit.editCharacter(Limit.getFormValue("ip"));
DayCount = CommonManager.Web.Request( "dd", "" ); //Limit.editCharacter(Limit.getFormValue("dd"));
Mac = CommonManager.Web.Request("mac", "");
DataTable sd = new DataTable();
string sql = "select count(*) as bbr,CONVERT(varchar(12),CONVERT(datetime,RegisterTM),110)as ddr from Web_Users where CONVERT(datetime,RegisterTM)>='" + beginTime + "' and CONVERT(datetime,RegisterTM)<='" + EndTime + "' and RegisterIP='" + IPS + "' group by CONVERT(varchar(12),CONVERT(datetime,RegisterTM),110) order by CONVERT(varchar(12),CONVERT(datetime,RegisterTM),110) asc";
//Response.Write(sql);
//Response.End();
sd = DbSession.Default.FromSql( sql ).ToDataTable(); //sqlconn.sqlReader(sql);
if(sd.Rows.Count>0)
{
IpCount.DataSource = sd;
IpCount.DataBind();
}
else
{
this.NoIpCount.Visible = true;
}
sd.Clear();
}
示例10: deletePartnerData
public string deletePartnerData(string year, string partnerId)
{
string conn = ConfigurationManager.ConnectionStrings["Conn"].ToString();
SqlConnection sqlConn = new SqlConnection();
sqlConn.ConnectionString = conn;
DataTable dt = new DataTable();
dt.Clear();
SqlCommand cmd = new SqlCommand(string.Format(
@"DELETE FROM REBATE WHERE [email protected] AND [email protected]_PARTNER"), sqlConn);
cmd.Parameters.AddWithValue("@YEAR", year);
cmd.Parameters.AddWithValue("@ID_PARTNER", partnerId);
try
{
sqlConn.Open();
cmd.ExecuteNonQuery();
return "The Partner Data specified has been removed sucessfully from the database.";
}
catch (Exception e)
{
return "error";
}
finally
{
sqlConn.Close();
}
}
示例11: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
AdminPopedom.IsHoldModel("03");
if (Request.QueryString["id"] != null)
{
id = Request.QueryString["id"].ToString();
if (!CommonManager.String.IsInteger(id))
{
Alert("警告:\\n\\n請勿非法操作!", null);
return;
}
if (!IsPostBack)
{
if (Convert.ToInt32(id) > 0)
{
DataTable dt = new DataTable();
string sql = "select * from Web_System Where ID=" + id + "";
dt = DbSession.Default.FromSql( sql ).ToDataTable(); //sqlconn.sqlReader(sql);
if (dt.Rows.Count > 0)
{
txtParaName.Text = dt.Rows[0]["ParaName"].ToString();
txtParaValue.Text = dt.Rows[0]["ParaValue"].ToString();
txtParaDesc.Text = dt.Rows[0]["Descript"].ToString();
}
dt.Clear();
}
}
}
}
示例12: LoadData
/////////////////////// بارگذاری داده های بانک /////////////////////
public void LoadData()
{
try
{
DataTable objT3 = new DataTable();
objT3.Clear();
objDataAdapter.SelectCommand = new SqlCommand();
objDataAdapter.SelectCommand.Connection = FrmEnter.objConnection;
objDataAdapter.SelectCommand.CommandText = "SELECT SessionID , SessionNumber , SessionDate , SessionDay , TedadMadovin , TedadGhaebin , SessionSubject , SessionTime , Hadaya , SessionLoc , SessionOrder , SessionMotafaregheh , SessionMosavab FROM Tbl_Session";
objDataAdapter.Fill(objT3);
dataGridView1.DataSource = objT3;
dataGridView1.Columns[0].HeaderText = " کد جلسه";
dataGridView1.Columns[1].HeaderText = "شماره جلسه";
dataGridView1.Columns[2].HeaderText = "تاریخ جلسه";
dataGridView1.Columns[3].HeaderText = "روز";
dataGridView1.Columns[4].HeaderText = "تعداد مدعوین";
dataGridView1.Columns[5].HeaderText = "تعداد غایبین";
dataGridView1.Columns[6].HeaderText = "موضوع";
dataGridView1.Columns[7].HeaderText = "ساعت حضور";
dataGridView1.Columns[8].HeaderText = "هدایا";
dataGridView1.Columns[9].HeaderText = "محل جلسه";
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
示例13: contarSeleccionadosCustodia
private void contarSeleccionadosCustodia()
{
SELECCION_CUSTODIA = VALORES_CUSTODIA.Copy();
SELECCION_CUSTODIA.Clear();
foreach(DataGridViewRow row in tblCustodia.Rows)
{
if (Convert.ToBoolean(row.Cells["CHECK"].Value))
{
DataRow nuevo = SELECCION_CUSTODIA.NewRow();
nuevo.SetField<int>("ID_PRESTAMO", VALORES_CUSTODIA.Rows[row.Index].Field<int>("ID_PRESTAMO"));
nuevo.SetField<int>("ID_LINEA", VALORES_CUSTODIA.Rows[row.Index].Field<int>("ID_LINEA"));
nuevo.SetField<string>("CONTRATO", VALORES_CUSTODIA.Rows[row.Index].Field<string>("CONTRATO"));
nuevo.SetField<double>("CANTIDAD", VALORES_CUSTODIA.Rows[row.Index].Field<double>("CANTIDAD"));
nuevo.SetField<string>("ARTICULO", VALORES_CUSTODIA.Rows[row.Index].Field<string>("ARTICULO"));
nuevo.SetField<string>("DESCRIPCION", VALORES_CUSTODIA.Rows[row.Index].Field<string>("DESCRIPCION"));
nuevo.SetField<decimal>("VALOR", VALORES_CUSTODIA.Rows[row.Index].Field<decimal>("VALOR"));
nuevo.SetField<string>("COD_TRANS", VALORES_CUSTODIA.Rows[row.Index].Field<string>("COD_TRANS"));
nuevo.SetField<int>("TIPO_TRANS", VALORES_CUSTODIA.Rows[row.Index].Field<int>("TIPO_TRANS"));
nuevo.SetField<string>("RESPONSABLE", VALORES_CUSTODIA.Rows[row.Index].Field<string>("RESPONSABLE"));
nuevo.SetField<string>("CATEGORIA", VALORES_CUSTODIA.Rows[row.Index].Field<string>("CATEGORIA"));
nuevo.SetField<string>("COD_SUC", VALORES_CUSTODIA.Rows[row.Index].Field<string>("COD_SUC"));
nuevo.SetField<string>("UBICACION", VALORES_CUSTODIA.Rows[row.Index].Field<string>("UBICACION"));
SELECCION_CUSTODIA.Rows.Add(nuevo);
}
}
lbSeleccionadosCustodia.Text = SELECCION_CUSTODIA.Rows.Count + " SELECCIONADOS";
}
示例14: DajSveUsluge
public void DajSveUsluge(DataTable usluga)
{
SqlConnection _konekcijaSqlConnection = new SqlConnection();
using (_konekcijaSqlConnection = Konekcija.DajKonekciju())
{
SqlDataAdapter _dajSveUslugeSqlDataAdapter = new SqlDataAdapter();
SqlCommand _dajSveUslugeSqlCommand = new SqlCommand("SELECT Usluga_ID, [Stara šifra], Naziv, Cena, [Norma sati], Napomena FROM vwUsluga", _konekcijaSqlConnection);
_dajSveUslugeSqlDataAdapter.SelectCommand = _dajSveUslugeSqlCommand;
usluga.Clear();
try
{
_konekcijaSqlConnection.Open();
_dajSveUslugeSqlDataAdapter.Fill(usluga);
_konekcijaSqlConnection.Close();
}
catch (Exception)
{
throw;
}
}
}
示例15: GetModelHtmlValue
public DataSet GetModelHtmlValue(string ChId, string Id)
{
int MyChId = int.Parse(ChId);
ChannelModel = MyChId <= 0 ? null : ChannelBll.GetChannel(MyChId);
MInfoModel = BInfoModel.GetModel(ChannelModel.ModelType);
DataTable dt=new DataTable();
DataRow dr = BInfoOper.GetInfo(MInfoModel.TableName, int.Parse(Id));
dt = dr.Table.Copy();
dt.Clear();
dt.ImportRow(dr);
dt.TableName = "DrInfo";
DataSet ds = new DataSet();
try
{
ds.Tables.Add(BModelField.GetList(ChannelModel.ModelType).Copy());
ds.Tables.Add(dt);
}
catch(Exception ex)
{
Response.Write(ex);
}
return ds;
}