/// <summary> /// 增加一条数据 /// </summary> public void Add(MobileSoft.Model.System.Tb_System_BusinessCorp model) { dal.Add(model); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(MobileSoft.Model.System.Tb_System_BusinessCorp model) { dal.Update(model); }
/// <summary> /// 获得数据列表 /// </summary> public List <MobileSoft.Model.System.Tb_System_BusinessCorp> DataTableToList(DataTable dt) { List <MobileSoft.Model.System.Tb_System_BusinessCorp> modelList = new List <MobileSoft.Model.System.Tb_System_BusinessCorp>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { MobileSoft.Model.System.Tb_System_BusinessCorp model; for (int n = 0; n < rowsCount; n++) { model = new MobileSoft.Model.System.Tb_System_BusinessCorp(); //model.BussId=dt.Rows[n]["BussId"].ToString(); model.RegBigType = dt.Rows[n]["RegBigType"].ToString(); model.RegSmallType = dt.Rows[n]["RegSmallType"].ToString(); model.BussName = dt.Rows[n]["BussName"].ToString(); model.BussShortName = dt.Rows[n]["BussShortName"].ToString(); model.Province = dt.Rows[n]["Province"].ToString(); model.City = dt.Rows[n]["City"].ToString(); model.Borough = dt.Rows[n]["Borough"].ToString(); model.LoginCode = dt.Rows[n]["LoginCode"].ToString(); model.LoginPassWD = dt.Rows[n]["LoginPassWD"].ToString(); model.BussAddress = dt.Rows[n]["BussAddress"].ToString(); model.BussZipCode = dt.Rows[n]["BussZipCode"].ToString(); model.BussLinkMan = dt.Rows[n]["BussLinkMan"].ToString(); model.BussMobileTel = dt.Rows[n]["BussMobileTel"].ToString(); model.BussWorkedTel = dt.Rows[n]["BussWorkedTel"].ToString(); model.BussEmail = dt.Rows[n]["BussEmail"].ToString(); model.BussWebName = dt.Rows[n]["BussWebName"].ToString(); model.BussQQ = dt.Rows[n]["BussQQ"].ToString(); model.BussWeiXin = dt.Rows[n]["BussWeiXin"].ToString(); model.LogoImgUrl = dt.Rows[n]["LogoImgUrl"].ToString(); model.MapImgUrl = dt.Rows[n]["MapImgUrl"].ToString(); model.SysDir = dt.Rows[n]["SysDir"].ToString(); model.SysVersion = dt.Rows[n]["SysVersion"].ToString(); if (dt.Rows[n]["RegDate"].ToString() != "") { model.RegDate = DateTime.Parse(dt.Rows[n]["RegDate"].ToString()); } if (dt.Rows[n]["IsDelete"].ToString() != "") { model.IsDelete = int.Parse(dt.Rows[n]["IsDelete"].ToString()); } if (dt.Rows[n]["BussSNum"].ToString() != "") { model.BussSNum = int.Parse(dt.Rows[n]["BussSNum"].ToString()); } if (dt.Rows[n]["BussSynchCode"].ToString() != "") { model.BussSynchCode = new Guid(dt.Rows[n]["BussSynchCode"].ToString()); } if (dt.Rows[n]["SynchFlag"].ToString() != "") { model.SynchFlag = int.Parse(dt.Rows[n]["SynchFlag"].ToString()); } if (dt.Rows[n]["IsRecommend"].ToString() != "") { model.IsRecommend = int.Parse(dt.Rows[n]["IsRecommend"].ToString()); } model.RecommendIndex = dt.Rows[n]["RecommendIndex"].ToString(); model.RecommendTitle = dt.Rows[n]["RecommendTitle"].ToString(); model.RecommendContent = dt.Rows[n]["RecommendContent"].ToString(); model.ImgLogo1 = dt.Rows[n]["ImgLogo1"].ToString(); model.ImgLogo2 = dt.Rows[n]["ImgLogo2"].ToString(); model.ImgLogo3 = dt.Rows[n]["ImgLogo3"].ToString(); model.ImgLogo4 = dt.Rows[n]["ImgLogo4"].ToString(); model.ImgLogo5 = dt.Rows[n]["ImgLogo5"].ToString(); model.ImgLogo6 = dt.Rows[n]["ImgLogo6"].ToString(); model.ImgLogo7 = dt.Rows[n]["ImgLogo7"].ToString(); model.ImgLogo8 = dt.Rows[n]["ImgLogo8"].ToString(); model.ImgLogo9 = dt.Rows[n]["ImgLogo9"].ToString(); model.ImgLogo10 = dt.Rows[n]["ImgLogo10"].ToString(); if (dt.Rows[n]["VisitCount"].ToString() != "") { model.VisitCount = int.Parse(dt.Rows[n]["VisitCount"].ToString()); } modelList.Add(model); } } return(modelList); }