/// <summary> /// 更新一条数据 /// </summary> public void Update(DigiPower.Onlinecol.Standard.Model.construction_project_c_MDL model) { dal.Update(model); }
/// <summary> /// 获得数据列表 /// </summary> public List <DigiPower.Onlinecol.Standard.Model.construction_project_c_MDL> DataTableToList(DataTable dt) { List <DigiPower.Onlinecol.Standard.Model.construction_project_c_MDL> modelList = new List <DigiPower.Onlinecol.Standard.Model.construction_project_c_MDL>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { DigiPower.Onlinecol.Standard.Model.construction_project_c_MDL model; for (int n = 0; n < rowsCount; n++) { model = new DigiPower.Onlinecol.Standard.Model.construction_project_c_MDL(); if (dt.Rows[n]["ConstructionProjectID"].ToString() != "") { model.ConstructionProjectID = int.Parse(dt.Rows[n]["ConstructionProjectID"].ToString()); } model.area_code = dt.Rows[n]["area_code"].ToString(); model.dh = dt.Rows[n]["dh"].ToString(); model.gcmc = dt.Rows[n]["gcmc"].ToString(); model.gcdd = dt.Rows[n]["gcdd"].ToString(); model.jsdw = dt.Rows[n]["jsdw"].ToString(); model.lxpzdw = dt.Rows[n]["lxpzdw"].ToString(); model.sjdw = dt.Rows[n]["sjdw"].ToString(); model.jgcldw = dt.Rows[n]["jgcldw"].ToString(); model.jldw = dt.Rows[n]["jldw"].ToString(); model.lxpzwh = dt.Rows[n]["lxpzwh"].ToString(); model.ghxkzh = dt.Rows[n]["ghxkzh"].ToString(); model.ydghxkzh = dt.Rows[n]["ydghxkzh"].ToString(); model.ydxkzh = dt.Rows[n]["ydxkzh"].ToString(); model.sgxkzh = dt.Rows[n]["sgxkzh"].ToString(); model.qd = dt.Rows[n]["qd"].ToString(); model.zd = dt.Rows[n]["zd"].ToString(); if (dt.Rows[n]["zcd"].ToString() != "") { model.zcd = decimal.Parse(dt.Rows[n]["zcd"].ToString()); } if (dt.Rows[n]["kgsj"].ToString() != "") { model.kgsj = DateTime.Parse(dt.Rows[n]["kgsj"].ToString()); } if (dt.Rows[n]["jgsj"].ToString() != "") { model.jgsj = DateTime.Parse(dt.Rows[n]["jgsj"].ToString()); } if (dt.Rows[n]["gczj"].ToString() != "") { model.gczj = decimal.Parse(dt.Rows[n]["gczj"].ToString()); } if (dt.Rows[n]["gczj_Bak"].ToString() != "") { model.gczj_Bak = decimal.Parse(dt.Rows[n]["gczj_Bak"].ToString()); } if (dt.Rows[n]["gcjs"].ToString() != "") { model.gcjs = decimal.Parse(dt.Rows[n]["gcjs"].ToString()); } if (dt.Rows[n]["zajs"].ToString() != "") { model.zajs = int.Parse(dt.Rows[n]["zajs"].ToString()); } if (dt.Rows[n]["wz"].ToString() != "") { model.wz = int.Parse(dt.Rows[n]["wz"].ToString()); } if (dt.Rows[n]["tzj"].ToString() != "") { model.tzj = int.Parse(dt.Rows[n]["tzj"].ToString()); } if (dt.Rows[n]["tzz"].ToString() != "") { model.tzz = int.Parse(dt.Rows[n]["tzz"].ToString()); } if (dt.Rows[n]["dt"].ToString() != "") { model.dt = int.Parse(dt.Rows[n]["dt"].ToString()); } if (dt.Rows[n]["zp"].ToString() != "") { model.zp = int.Parse(dt.Rows[n]["zp"].ToString()); } if (dt.Rows[n]["dp"].ToString() != "") { model.dp = int.Parse(dt.Rows[n]["dp"].ToString()); } if (dt.Rows[n]["ly"].ToString() != "") { model.ly = int.Parse(dt.Rows[n]["ly"].ToString()); } if (dt.Rows[n]["lx"].ToString() != "") { model.lx = int.Parse(dt.Rows[n]["lx"].ToString()); } if (dt.Rows[n]["gp"].ToString() != "") { model.gp = int.Parse(dt.Rows[n]["gp"].ToString()); } if (dt.Rows[n]["cd"].ToString() != "") { model.cd = int.Parse(dt.Rows[n]["cd"].ToString()); } if (dt.Rows[n]["cp"].ToString() != "") { model.cp = int.Parse(dt.Rows[n]["cp"].ToString()); } if (dt.Rows[n]["swp"].ToString() != "") { model.swp = int.Parse(dt.Rows[n]["swp"].ToString()); } if (dt.Rows[n]["swz"].ToString() != "") { model.swz = int.Parse(dt.Rows[n]["swz"].ToString()); } if (dt.Rows[n]["qt"].ToString() != "") { model.qt = int.Parse(dt.Rows[n]["qt"].ToString()); } model.bgqx = dt.Rows[n]["bgqx"].ToString(); model.mj = dt.Rows[n]["mj"].ToString(); if (dt.Rows[n]["jgrq"].ToString() != "") { model.jgrq = DateTime.Parse(dt.Rows[n]["jgrq"].ToString()); } model.yjdw = dt.Rows[n]["yjdw"].ToString(); model.swh = dt.Rows[n]["swh"].ToString(); model.cfwz = dt.Rows[n]["cfwz"].ToString(); model.note = dt.Rows[n]["note"].ToString(); model.lrr = dt.Rows[n]["lrr"].ToString(); if (dt.Rows[n]["lrsj"].ToString() != "") { model.lrsj = DateTime.Parse(dt.Rows[n]["lrsj"].ToString()); } if (dt.Rows[n]["gisid"].ToString() != "") { model.gisid = int.Parse(dt.Rows[n]["gisid"].ToString()); } if (dt.Rows[n]["ywzd"].ToString() != "") { model.ywzd = int.Parse(dt.Rows[n]["ywzd"].ToString()); } model.xmbh = dt.Rows[n]["xmbh"].ToString(); model.bjlxr = dt.Rows[n]["bjlxr"].ToString(); model.lxdh = dt.Rows[n]["lxdh"].ToString(); model.yddw = dt.Rows[n]["yddw"].ToString(); model.bzdw = dt.Rows[n]["bzdw"].ToString(); model.kcdw = dt.Rows[n]["kcdw"].ToString(); model.sgdw = dt.Rows[n]["sgdw"].ToString(); model.gcxh = dt.Rows[n]["gcxh"].ToString(); model.zlyj = dt.Rows[n]["zlyj"].ToString(); model.TJLB = dt.Rows[n]["TJLB"].ToString(); model.jsdw_xmfzr = dt.Rows[n]["jsdw_xmfzr"].ToString(); model.gcqy = dt.Rows[n]["gcqy"].ToString(); if (dt.Rows[n]["wzz"].ToString() != "") { model.wzz = int.Parse(dt.Rows[n]["wzz"].ToString()); } modelList.Add(model); } } return(modelList); }