/// <summary> /// 获得数据列表 /// </summary> public List <Dianda.Model.Project_Apply_signet> DataTableToList(DataTable dt) { List <Dianda.Model.Project_Apply_signet> modelList = new List <Dianda.Model.Project_Apply_signet>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { Dianda.Model.Project_Apply_signet model; for (int n = 0; n < rowsCount; n++) { model = new Dianda.Model.Project_Apply_signet(); if (dt.Rows[n]["ID"].ToString() != "") { model.ID = int.Parse(dt.Rows[n]["ID"].ToString()); } if (dt.Rows[n]["ApplyID"].ToString() != "") { model.ApplyID = int.Parse(dt.Rows[n]["ApplyID"].ToString()); } if (dt.Rows[n]["SignetID"].ToString() != "") { model.SignetID = int.Parse(dt.Rows[n]["SignetID"].ToString()); } if (dt.Rows[n]["Nums"].ToString() != "") { model.Nums = int.Parse(dt.Rows[n]["Nums"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(Dianda.Model.Project_Apply_signet model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Dianda.Model.Project_Apply_signet model) { return(dal.Add(model)); }