/// <summary> /// 获得数据列表 /// </summary> public List <MobileSoft.Model.Information.Tb_Information_ContactUs> DataTableToList(DataTable dt) { List <MobileSoft.Model.Information.Tb_Information_ContactUs> modelList = new List <MobileSoft.Model.Information.Tb_Information_ContactUs>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { MobileSoft.Model.Information.Tb_Information_ContactUs model; for (int n = 0; n < rowsCount; n++) { model = new MobileSoft.Model.Information.Tb_Information_ContactUs(); //model.ID=dt.Rows[n]["ID"].ToString(); //model.BussId=dt.Rows[n]["BussId"].ToString(); model.BussName = dt.Rows[n]["BussName"].ToString(); model.Address = dt.Rows[n]["Address"].ToString(); model.Postal = dt.Rows[n]["Postal"].ToString(); model.LinkMan = dt.Rows[n]["LinkMan"].ToString(); model.Tel = dt.Rows[n]["Tel"].ToString(); model.Phone = dt.Rows[n]["Phone"].ToString(); model.Email = dt.Rows[n]["Email"].ToString(); model.QQ = dt.Rows[n]["QQ"].ToString(); model.Wechat = dt.Rows[n]["Wechat"].ToString(); model.URL = dt.Rows[n]["URL"].ToString(); model.Map = dt.Rows[n]["Map"].ToString(); model.ContactUsContent = dt.Rows[n]["ContactUsContent"].ToString(); modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(MobileSoft.Model.Information.Tb_Information_ContactUs model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public long Add(MobileSoft.Model.Information.Tb_Information_ContactUs model) { return(dal.Add(model)); }