예제 #1
0
 /// <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());
     }
 }
예제 #2
0
 public List <PeopleJian> GetPeopleJianList()
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.PeopleJian.Where(link => link.FlagDelete == 0).ToList());
     }
 }
예제 #3
0
 /// <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));
     }
 }
예제 #6
0
 public List <t_City> GetCityListByfather(string father)
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.t_City.Where(wc => wc.father == father).ToList());
     }
 }
예제 #7
0
 public t_City GetCityByID(string cityid)
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.t_City.Find(cityid));
     }
 }
예제 #8
0
 public List <WebNews> GetWebNewsList()
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.WebNews.Where(wn => wn.FlagDelete == 0).OrderByDescending(wn => wn.CreatedDate).ToList());
     }
 }
예제 #9
0
 public List <WebNews> GetWebNewsListByParentID(int ParentID)
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.WebNews.Where(wn => wn.ParentID == ParentID && wn.FlagDelete == 0).ToList());
     }
 }
예제 #10
0
 public WebImg GetWebImgByID(int webImgID)
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.WebImg.FirstOrDefault(wc => wc.ImgId == webImgID && wc.FlagDelete == 0));
     }
 }
예제 #11
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);
         }
     }
 }
예제 #12
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());
     }
 }
예제 #13
0
 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());
     }
 }
예제 #14
0
 public WebPicture GetWebPictureByID(int WebPictureID)
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.WebPicture.Find(WebPictureID));
     }
 }
예제 #15
0
 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);
     }
 }
예제 #16
0
 /// <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());
     }
 }
예제 #17
0
 public List <t_Province> GetProvinceList()
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.t_Province.ToList());
     }
 }
예제 #18
0
 public WebNews GetWebNewsByID(int newID)
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.WebNews.Find(newID));
     }
 }
예제 #19
0
 public List <t_Area> GetAreaListByfather(string father)
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.Areas.Where(wc => wc.flagdelete == 0 && wc.father == father).ToList());
     }
 }
예제 #20
0
 /// <summary>
 /// 推送列表全部
 /// </summary>
 public List <WebGoods> GetWebGoodsList()
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.WebGoods.Where(p => p.FlagDelete == 0).OrderByDescending(p => p.EditOn).ToList());
     }
 }
예제 #21
0
 public List <t_City> GetHotCityList()
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.t_City.Where(wc => wc.hotcity == 1).OrderByDescending(wc => wc.orderid).ToList());
     }
 }
예제 #22
0
 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));
     }
 }
예제 #24
0
        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);
            }
        }
예제 #25
0
        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);
            }
        }
예제 #26
0
 public WebCompanyUser GetWebCompanyUserByID(int userID)
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.WebCompanyUser.Find(userID));
     }
 }
예제 #27
0
 public PeopleJian GetPeopleJianByID(int id)
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.PeopleJian.Find(id));
     }
 }
예제 #28
0
 public List <WebCompanyUser> GetWebCompanyUserList()
 {
     using (AIYunNetContext context = new AIYunNetContext())
     {
         return(context.WebCompanyUser.Where(su => su.IsDelete == false).OrderByDescending(su => su.AddOn).ToList());
     }
 }
예제 #29
0
        /// <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);
                }
            }
        }
예제 #30
0
 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);
         }
     }
 }