/// <summary> /// 获得数据列表 /// </summary> public List <EDRS.Model.YX_DZJZ_LSYJXZSQ> DataTableToList(DataTable dt) { List <EDRS.Model.YX_DZJZ_LSYJXZSQ> modelList = new List <EDRS.Model.YX_DZJZ_LSYJXZSQ>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { EDRS.Model.YX_DZJZ_LSYJXZSQ model; for (int n = 0; n < rowsCount; n++) { model = new EDRS.Model.YX_DZJZ_LSYJXZSQ(); model.SQBM = dt.Rows[n]["SQBM"].ToString(); model.LSZH = dt.Rows[n]["LSZH"].ToString(); model.LSXM = dt.Rows[n]["LSXM"].ToString(); model.SSDW = dt.Rows[n]["SSDW"].ToString(); model.AJMC = dt.Rows[n]["AJMC"].ToString(); model.XYRMC = dt.Rows[n]["XYRMC"].ToString(); model.SQRMC = dt.Rows[n]["SQRMC"].ToString(); model.SQDW = dt.Rows[n]["SQDW"].ToString(); model.XZDZ = dt.Rows[n]["XZDZ"].ToString(); model.SQDZT = dt.Rows[n]["SQDZT"].ToString(); if (dt.Rows[n]["SQSJ"].ToString() != "") { model.SQSJ = DateTime.Parse(dt.Rows[n]["SQSJ"].ToString()); } model.BZ = dt.Rows[n]["BZ"].ToString(); model.SFSC = dt.Rows[n]["SFSC"].ToString(); model.SHRGH = dt.Rows[n]["SHRGH"].ToString(); model.SHR = dt.Rows[n]["SHR"].ToString(); if (dt.Rows[n]["SHSJ"].ToString() != "") { model.SHSJ = DateTime.Parse(dt.Rows[n]["SHSJ"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(EDRS.Model.YX_DZJZ_LSYJXZSQ model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(EDRS.Model.YX_DZJZ_LSYJXZSQ model) { return(dal.Add(model)); }