/// <summary> /// 推送列表 /// </summary> public List <WebPicture> GetWebPictureList(int WebImgID, int num) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebPicture.Where(p => p.FlagDelete == 0 && p.WebImgID == WebImgID).Take(num).ToList()); } }
public List <PeopleJian> GetPeopleJianList() { using (AIYunNetContext context = new AIYunNetContext()) { return(context.PeopleJian.Where(link => link.FlagDelete == 0).ToList()); } }
/// <summary> /// 通过UserID获取单个人员 /// </summary> public WebWorker GetWebWorkerByUserID(int userID) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebWorker.FirstOrDefault(c => c.UserID == userID)); } }
/// <summary> /// 获取审核用户 /// </summary> public List <WebCompanyGuarantMoney> GetWebCompanyGuarantMoneyList(int IsGuarantMoney) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebCompanyGuarantMoney.Where(p => p.IsDelete == 0 && p.IsGuarantMoney == IsGuarantMoney).ToList()); } }
public WebCompanyGuarantMoney GetWebCompanyGuarantMoneyByID(int id) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebCompanyGuarantMoney.Find(id)); } }
public List <t_City> GetCityListByfather(string father) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.t_City.Where(wc => wc.father == father).ToList()); } }
public t_City GetCityByID(string cityid) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.t_City.Find(cityid)); } }
public List <WebNews> GetWebNewsList() { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebNews.Where(wn => wn.FlagDelete == 0).OrderByDescending(wn => wn.CreatedDate).ToList()); } }
public List <WebNews> GetWebNewsListByParentID(int ParentID) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebNews.Where(wn => wn.ParentID == ParentID && wn.FlagDelete == 0).ToList()); } }
public WebImg GetWebImgByID(int webImgID) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebImg.FirstOrDefault(wc => wc.ImgId == webImgID && wc.FlagDelete == 0)); } }
public int UpdateWebImg(WebImg WebImg) { using (AIYunNetContext context = new AIYunNetContext()) { WebImg originalImg = context.WebImg.Find(WebImg.ImgId); if (originalImg != null) { originalImg.ImgTitle = WebImg.ImgTitle; originalImg.ImgInfo = WebImg.ImgInfo; originalImg.ImgContent = WebImg.ImgContent; originalImg.thumbnailImage = WebImg.thumbnailImage; originalImg.ImgUrl = WebImg.ImgUrl; originalImg.softcoverstyle = WebImg.softcoverstyle; originalImg.hotalstyle = WebImg.hotalstyle; originalImg.designerrstyle = WebImg.designerrstyle; originalImg.commercialstyle = WebImg.commercialstyle; originalImg.IsPublish = WebImg.IsPublish; originalImg.IsTop = WebImg.IsTop; originalImg.editon = DateTime.Now; originalImg.ImgJzspce = WebImg.ImgJzspce; originalImg.ImgGzspace = WebImg.ImgGzspace; originalImg.ImgJzstyle = WebImg.ImgJzstyle; originalImg.DecType = WebImg.DecType; originalImg.CompanyID = 0; originalImg.PeopleID = 0; context.SaveChanges(); return(1); } else { return(0); } } }
public List <WebImg> GetWebImgListByParameter(string sql) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebImg.Where(wc => wc.FlagDelete == 0).OrderByDescending(wc => wc.addon).ToList()); } }
public List <WebImg> GetWebImgList(int DecType) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebImg.Where(wc => wc.FlagDelete == 0 && wc.DecType == DecType).OrderByDescending(wc => wc.addon).ToList()); } }
public WebPicture GetWebPictureByID(int WebPictureID) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebPicture.Find(WebPictureID)); } }
public List <city> GetJson() { using (AIYunNetContext context = new AIYunNetContext()) { List <city> list = new List <city>(); List <t_Province> provincelist = context.t_Province.ToList(); foreach (var item in provincelist) { city ci = new city(); ci.value = item.provinceID; ci.text = item.province; List <area> li = new List <area>(); List <t_City> citylist = context.t_City.Where(c => c.father == item.provinceID).ToList(); foreach (t_City ite in citylist) { area ar = new area(); ar.value = ite.cityID; ar.text = ite.city; li.Add(ar); } ci.children = li; list.Add(ci); } return(list); } }
/// <summary> /// 首页获取置首装修新闻列表 /// </summary> /// <param name="menuID">类型ID</param> /// <returns></returns> public List <WebNews> IndexGetWebNewsListByMenuID(int menuID) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebNews.Where(wn => wn.ClassID == menuID && wn.FlagDelete == 0 && wn.IsTop == true).Take(5).ToList()); } }
public List <t_Province> GetProvinceList() { using (AIYunNetContext context = new AIYunNetContext()) { return(context.t_Province.ToList()); } }
public WebNews GetWebNewsByID(int newID) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebNews.Find(newID)); } }
public List <t_Area> GetAreaListByfather(string father) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.Areas.Where(wc => wc.flagdelete == 0 && wc.father == father).ToList()); } }
/// <summary> /// 推送列表全部 /// </summary> public List <WebGoods> GetWebGoodsList() { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebGoods.Where(p => p.FlagDelete == 0).OrderByDescending(p => p.EditOn).ToList()); } }
public List <t_City> GetHotCityList() { using (AIYunNetContext context = new AIYunNetContext()) { return(context.t_City.Where(wc => wc.hotcity == 1).OrderByDescending(wc => wc.orderid).ToList()); } }
public WebGoods GetWebGoodsByID(int WebGoodsID) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebGoods.Find(WebGoodsID)); } }
public WebCompanyGuarantMoney GetWebCompanyGuarantMoneyByUserID(int UserID) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebCompanyGuarantMoney.FirstOrDefault(c => c.CompanyUserID == UserID)); } }
public int UpdateWebGoods(WebGoods WebGoods) { using (AIYunNetContext context = new AIYunNetContext()) { if (WebGoods != null) { WebGoods origWebGoods = context.WebGoods.Find(WebGoods.GoodsID); if (origWebGoods != null) { origWebGoods.goods_name = WebGoods.goods_name; origWebGoods.goods_desc = WebGoods.goods_desc; origWebGoods.logo = WebGoods.logo; origWebGoods.price = WebGoods.price; origWebGoods.is_on_sale = WebGoods.is_on_sale; origWebGoods.IsTop = WebGoods.IsTop; origWebGoods.thumbnailImage = WebGoods.thumbnailImage; origWebGoods.Goodstock = WebGoods.Goodstock; origWebGoods.Belongs = WebGoods.Belongs; origWebGoods.Newprice = WebGoods.Newprice; origWebGoods.Salesnum = WebGoods.Salesnum; origWebGoods.goods_Info = WebGoods.goods_Info; origWebGoods.EditOn = DateTime.Now; context.SaveChanges(); } } return(1); } }
public List <WebBuidingCase> GetBuidingCaseListByWorkerID(int workerid, int count = 0) { List <WebBuidingCase> list = new List <WebBuidingCase>(); using (AIYunNetContext context = new AIYunNetContext()) { try { if (count > 0) { list = context.WebBuidingCase.Where(c => c.WorkerID == workerid && c.IsDelete == 0).OrderByDescending(c => c.sorting).OrderByDescending(c => c.EditOn).Take(count).ToList(); } else { list = context.WebBuidingCase.Where(c => c.WorkerID == workerid && c.IsDelete == 0).OrderByDescending(c => c.sorting).OrderByDescending(c => c.EditOn).ToList(); } if (list == null) { list = new List <WebBuidingCase>(); } } catch (Exception e) { } return(list); } }
public WebCompanyUser GetWebCompanyUserByID(int userID) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebCompanyUser.Find(userID)); } }
public PeopleJian GetPeopleJianByID(int id) { using (AIYunNetContext context = new AIYunNetContext()) { return(context.PeopleJian.Find(id)); } }
public List <WebCompanyUser> GetWebCompanyUserList() { using (AIYunNetContext context = new AIYunNetContext()) { return(context.WebCompanyUser.Where(su => su.IsDelete == false).OrderByDescending(su => su.AddOn).ToList()); } }
/// <summary> /// 手机端选取合作工人 /// </summary> public List <WebWorker> mGetWorkerExceptSelf(int workerid, string WorkerName, int PageIndex, int PageSize, string WorkerCategory, string WorkerPositionID) { List <WebWorker> list = new List <WebWorker>(); using (AIYunNetContext context = new AIYunNetContext()) { if (WorkerName != "") { list = context.WebWorker.Where(c => c.WorkerID != workerid && c.FlagDelete == 0 && c.WorkerName.Contains(WorkerName)).OrderByDescending(wb => wb.Stars).Skip(PageSize * (PageIndex - 1)).Take(PageSize * PageIndex).ToList(); return(list); } if (WorkerCategory == "装修工长") { list = context.WebWorker.Where(c => c.WorkerID != workerid && c.FlagDelete == 0 && c.WorkerCategory == WorkerCategory).OrderByDescending(wb => wb.Stars).Skip(PageSize * (PageIndex - 1)).Take(PageSize * PageIndex).ToList(); return(list); } else { if (WorkerPositionID == "0") { list = context.WebWorker.Where(c => c.WorkerID != workerid && c.FlagDelete == 0 && c.WorkerCategory == WorkerCategory).OrderByDescending(wb => wb.Stars).Skip(PageSize * (PageIndex - 1)).Take(PageSize * PageIndex).ToList(); } else { list = context.WebWorker.Where(c => c.WorkerID != workerid && c.FlagDelete == 0 && c.WorkerCategory == WorkerCategory && c.WorkerPositionID == WorkerPositionID).OrderByDescending(wb => wb.Stars).Skip(PageSize * (PageIndex - 1)).Take(PageSize * PageIndex).ToList(); } return(list); } } }
public int UpdateDownLoad(DownLoad DownLoad) { using (AIYunNetContext context = new AIYunNetContext()) { DownLoad originalDownLoad = context.DownLoad.Find(DownLoad.ID); if (originalDownLoad != null) { originalDownLoad.EditOn = DateTime.Now; originalDownLoad.fileurl = DownLoad.fileurl; originalDownLoad.firstID = DownLoad.firstID; originalDownLoad.form = DownLoad.form; originalDownLoad.DownLoadImage = DownLoad.DownLoadImage; originalDownLoad.Info = DownLoad.Info; originalDownLoad.LookupCode = DownLoad.LookupCode; originalDownLoad.score = DownLoad.score; originalDownLoad.secondID = DownLoad.secondID; originalDownLoad.Size = DownLoad.Size; originalDownLoad.thumbnailImage = DownLoad.thumbnailImage; originalDownLoad.title = DownLoad.title; //originalDownLoad.upbody = DownLoad.upbody; //originalDownLoad.userid = DownLoad.userid; //originalDownLoad.usertype = DownLoad.usertype; context.SaveChanges(); return(1); } else { return(0); } } }