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