/// <summary> /// 获得数据列表 /// </summary> public List <eChartProject.Model.eChart.bankaccounttype> DataTableToList(DataTable dt) { List <eChartProject.Model.eChart.bankaccounttype> modelList = new List <eChartProject.Model.eChart.bankaccounttype>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { eChartProject.Model.eChart.bankaccounttype model; for (int n = 0; n < rowsCount; n++) { model = new eChartProject.Model.eChart.bankaccounttype(); if (dt.Rows[n]["ID"] != null && dt.Rows[n]["ID"].ToString() != "") { model.ID = int.Parse(dt.Rows[n]["ID"].ToString()); } if (dt.Rows[n]["BankName"] != null && dt.Rows[n]["BankName"].ToString() != "") { model.BankName = dt.Rows[n]["BankName"].ToString(); } if (dt.Rows[n]["AccountTypeName"] != null && dt.Rows[n]["AccountTypeName"].ToString() != "") { model.AccountTypeName = dt.Rows[n]["AccountTypeName"].ToString(); } if (dt.Rows[n]["IsBankAccountTypeView"] != null && dt.Rows[n]["IsBankAccountTypeView"].ToString() != "") { model.IsBankAccountTypeView = int.Parse(dt.Rows[n]["IsBankAccountTypeView"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(eChartProject.Model.eChart.bankaccounttype model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(eChartProject.Model.eChart.bankaccounttype model) { dal.Add(model); }