/// <summary> /// 根据分类Id 和级别获取子分类 /// </summary> /// <returns></returns> public string GetClassFoundLevel() { int _level = FormString.IntSafeQ("level"); int _pid = FormString.IntSafeQ("pid"); int siteid = FormString.IntSafeQ("siteid", -1); int _classmenutype = FormString.IntSafeQ("menutype", -1); IList <ClassesFoundEntity> list = new List <ClassesFoundEntity>(); list = ClassesFoundBLL.Instance.GetClassListByLevel(_pid, _level, siteid); string liststr = JsonJC.ObjectToJson(list); return(liststr); }
/// <summary> /// 品牌信息修改 /// </summary> /// <returns></returns> public string BrandEditSubmit() { ResultObj _obj = new ResultObj(); int _enid = FormString.IntSafeQ("enid"); string _name = FormString.SafeQ("name"); int _sort = FormString.IntSafeQ("sort"); int _isactive = FormString.IntSafeQ("isactive"); int _ishot = FormString.IntSafeQ("ishot"); string _manu = FormString.SafeQ("manu"); string _picurl = FormString.SafeQ("picurl"); BrandEntity entity = new BrandEntity(); if (_enid > 0) { entity = BrandBLL.Instance.GetBrand(_enid); } entity.Name = _name; entity.Sort = _sort; entity.IsActive = _isactive; entity.IsHot = _ishot; entity.Manufacturer = _manu; entity.PicUrl = _picurl; if (_enid > 0) { int _result = BrandBLL.Instance.UpdateBrand(entity); if (_result > 0) { _obj.Status = (int)CommonStatus.Success; _obj.Obj = entity; } else { _obj.Status = (int)CommonStatus.Fail; } } else { entity.Id = BrandBLL.Instance.AddBrand(entity); if (entity.Id > 0) { _obj.Status = (int)CommonStatus.Success; _obj.Obj = entity; } else { _obj.Status = (int)CommonStatus.Fail; } } return(JsonJC.ObjectToJson(_obj)); }
/// <summary> /// 退换货订单审核拒绝 /// </summary> /// <returns></returns> public int RefuseReturnApply() { int _id = FormString.IntSafeQ("id"); string _rejectreason = FormString.SafeQ("rejectreason", 1000); ReturnXSEntity _entity = ReturnXSBLL.Instance.GetReturnXS(_id, -1); _entity.CheckManId = memid.ToString(); _entity.CheckTime = DateTime.Now; _entity.Status = (int)ReturnOrderStatus.Reject; _entity.RejectReason = _rejectreason; return(ReturnXSBLL.Instance.UpdateReturnXS(_entity)); }
/// <summary> /// 上架或者下架产品 /// </summary> /// <returns></returns> public int OnorOffShelf() { int _id = FormString.IntSafeQ("id"); int _status = FormString.IntSafeQ("status"); if (_id < 1 || _status > 1 || _status < 0) { return(0); } int _result = ProductDetailBLL.Instance.UpdatePDetailStatus(_id, _status); return(_result); }
public string GetHotProductByClass() { int _classid = FormString.IntSafeQ("classid"); IList <VWProductEntity> _list = new List <VWProductEntity>(); _list = ProductSimilarHotBLL.Instance.GetHotProducts(_classid); if (_list == null || _list.Count == 0) { _list = ProductSimilarHotBLL.Instance.GetHotProducts(0); } string liststr = JsonJC.ObjectToJson(_list); return(liststr); }
/// <summary> /// 添加退换货信息 /// </summary> /// <returns></returns> public int AddCGReturnInfo() { int _CGMemId = FormString.IntSafeQ("CGMemId"); int _ReturnXSId = FormString.IntSafeQ("ReturnXSId"); int _returnNum = FormString.IntSafeQ("ReturnNum"); CGReturnEntity entity = new CGReturnEntity(); entity.CGMemId = _CGMemId; entity.B2BReturnXSId = _ReturnXSId; entity.ReturnNum = _returnNum; entity.Status = 0; return(CGReturnBLL.Instance.AddCGReturn(entity)); }
public string GetProductStockNum() { string result = ""; int _pdid = FormString.IntSafeQ("pdid");//上级品牌Id,0代表第一级 if (_pdid > 0) { VWProductDetailEntity entity = ProductDetailBLL.Instance.GetProductDetail(_pdid); if (entity != null && entity.Id > 0) { result = entity.StockNum.ToString(); } } return(result); }
/// <summary> /// 购物指南添加 /// </summary> /// <returns></returns> public int ShoppingDirectoryAdd() { string _issuetitle = FormString.SafeQ("issuetitle"); string _issuecontent = FormString.SafeQNo("issuecontent", 1000000); int _isactive = FormString.IntSafeQ("isactive"); int _classid = FormString.IntSafeQ("classid"); IssueContentEntity entity = new IssueContentEntity(); entity.IssueTitle = _issuetitle; entity.IssueContent = _issuecontent; entity.IsActive = _isactive; entity.ClassId = _classid; return(IssueContentBLL.Instance.AddIssueContent(entity)); }
public string GetProductFine() { int _finetype = FormString.IntSafeQ("ft", (int)ProductFineTypeEnum.MobileHome);//精选类型 int _pageindex = FormString.IntSafeQ("pageindex"); int _pagesize = CommonKey.PageSizeList; int total = 0; IList <VWProductFineEntity> list = ProductFineBLL.Instance.GetProductFineList(_pagesize, _pagesize, ref total, _finetype); ListObj listobj = new ListObj(); listobj.Total = total; listobj.List = list; string liststr = JsonJC.ObjectToJson(listobj); return(liststr); }
/// <summary> /// 分类品牌信息添加 /// </summary> /// <returns></returns> public int ClassBrandInfoAdd() { int _classid = FormString.IntSafeQ("classid"); int _brandid = FormString.IntSafeQ("brandid"); int _sort = FormString.IntSafeQ("sort"); ClassBrandEntity entity = new ClassBrandEntity(); entity.ClassId = _classid; entity.BrandId = _brandid; entity.Sort = _sort; int _result = ClassBrandBLL.Instance.AddClassBrand(entity); return(_result); }
/// <summary> /// 获取车的品牌列表 /// </summary> /// <returns></returns> public string GetBrandCarList() { int _pid = FormString.IntSafeQ("pid");//上级品牌Id,0代表第一级 IList <CarTypeEntity> list = new List <CarTypeEntity>(); list = CarTypeBLL.Instance.GetListByParent(_pid); var listfilter = list.Select( p => new { Code = p.Id, Name = p.Name }); string liststr = JsonJC.ObjectToJson(listfilter); return(liststr); }
/// <summary> /// 收货地址 /// </summary> /// <returns></returns> public string GetReceiptAddress() { int _id = FormString.IntSafeQ("addressid"); MemPostAddressEntity _entity = new MemPostAddressEntity(); _entity = PostAddressBLL.Instance.GetPostAddress(_id); if (_entity.MemId == memid) { return(JsonJC.ObjectToJson(_entity)); } else { return(JsonJC.ObjectToJson(new MemPostAddressEntity())); } }
/// <summary> /// 信息修改 /// </summary> /// <returns></returns> public string GYProvinceEditSubmit() { ResultObj _obj = new ResultObj(); int enid = FormString.IntSafeQ("enid"); string name = FormString.SafeQ("name"); int sort = FormString.IntSafeQ("sort"); int isactive = FormString.IntSafeQ("isactive"); string fullname = FormString.SafeQ("fullname"); GYProvinceEntity entity = new GYProvinceEntity(); if (enid > 0) { entity = GYProvinceBLL.Instance.GetGYProvince(enid); } entity.Name = name; entity.Sort = sort; entity.IsActive = isactive; entity.FullName = fullname; if (enid > 0) { int _result = GYProvinceBLL.Instance.UpdateGYProvince(entity); if (_result > 0) { _obj.Status = (int)CommonStatus.Success; _obj.Obj = entity; } else { _obj.Status = (int)CommonStatus.Fail; } } else { entity.Id = GYProvinceBLL.Instance.AddGYProvince(entity); if (entity.Id > 0) { _obj.Status = (int)CommonStatus.Success; _obj.Obj = entity; } else { _obj.Status = (int)CommonStatus.Fail; } } return(JsonJC.ObjectToJson(_obj)); }
/// <summary> /// 分类品牌信息修改 /// </summary> /// <returns></returns> public int ClassBrandInfoUpdate() { int _id = FormString.IntSafeQ("id"); int _classid = FormString.IntSafeQ("classid"); int _brandid = FormString.IntSafeQ("brandid"); int _sort = FormString.IntSafeQ("sort"); ClassBrandEntity entity = ClassBrandBLL.Instance.GetClassBrand(_id); entity.ClassId = _classid; entity.BrandId = _brandid; entity.Sort = _sort; int _result = ClassBrandBLL.Instance.UpdateClassBrand(entity); return(_result); }
public string GetClassFoundBasic() { int _level = -1; int _pid = FormString.IntSafeQ("pid", 0); int siteid = -1; int _classmenutype = (int)ClassMenuTypeEnum.Default; IList <ClassesFoundEntity> list = new List <ClassesFoundEntity>(); list = ClassesFoundBLL.Instance.GetClassListByLevel(_pid, _level, siteid); foreach (ClassesFoundEntity entity in list) { entity.Code = entity.Id.ToString(); } string liststr = JsonJC.ObjectToJson(list); return(liststr); }
/// <summary> /// 根据分类得到对应规格 /// </summary> /// <returns></returns> public string GetSpecByClass() { int _classid = FormString.IntSafeQ("classid"); int _pid = FormString.IntSafeQ("pid");//上级品牌Id,0代表第一级 IList <VWClassSpecEntity> list = new List <VWClassSpecEntity>(); //list = ClassSpecBLL.Instance.GetListByClass(_classid, _pid); var listfilter = list.Select( p => new { Id = p.SpecId, Name = p.Name, IsEnd = p.IsEnd }); string liststr = JsonJC.ObjectToJson(listfilter); return(liststr); }
///// <summary> ///// 根据分类得到对应规格 ///// </summary> ///// <returns></returns> //public string GetSpecByClass() //{ // int _classid = FormString.IntSafeQ("classid"); // int _pid = FormString.IntSafeQ("pid");//上级品牌Id,0代表第一级 // IList<VWClassSpecEntity> list = new List<VWClassSpecEntity>(); // list = ClassSpecBLL.Instance.GetListByClass(_classid, _pid); // var listfilter = list.Select( // p => new // { // Id = p.SpecId, // Name = p.Name, // IsEnd = p.IsEnd // }); // string liststr = JsonJC.ObjectToJson(listfilter); // return liststr; //} /// <summary> /// 根据分类得到对应规格 /// </summary> /// <returns></returns> public string GetSpecValueByStyle() { int _styleid = FormString.IntSafeQ("styleid"); int _specid = FormString.IntSafeQ("specid");//上级品牌Id,0代表第一级 IList <VWProductStyleSpecEntity> list = new List <VWProductStyleSpecEntity>(); list = ProductStyleSpecBLL.Instance.GetListByStyle(_styleid, _specid); var listfilter = list.Select( p => new { Id = p.SpecId, Name = p.SpecDetailName }); string liststr = JsonJC.ObjectToJson(listfilter); return(liststr); }
///<summary> /// 根据分类Id 获取对应分类的品牌列表 /// </summary> /// <returns></returns> public string GetBrandByClass() { int _classid = FormString.IntSafeQ("classid"); int _pid = FormString.IntSafeQ("pid");//上级品牌Id,0代表第一级 IList <BrandEntity> list = new List <BrandEntity>(); list = ClassBrandBLL.Instance.GetBrandByClass(_classid, _pid); var listfilter = list.Select( p => new { Code = p.Id, Name = p.Name }); string liststr = JsonJC.ObjectToJson(listfilter); return(liststr); }
/// <summary> /// 根据分类得到对应属性 /// </summary> /// <returns></returns> public string GetPropertyByClass() { int _classid = FormString.IntSafeQ("classid"); int _parentid = FormString.IntSafeQ("pid");//上级 ,0代表第一级 IList <BasicSitePropertiesEntity> list = new List <BasicSitePropertiesEntity>(); list = BasicSitePropertiesBLL.Instance.GetListByClassId(_classid, _parentid); var listfilter = list.Select( p => new { Id = p.Id, Name = p.Name }); string liststr = JsonJC.ObjectToJson(listfilter); return(liststr); }
/// <summary> /// 根据分类得到对应属性 /// </summary> /// <returns></returns> public string GetPropertyValueList() { int _propertyId = FormString.IntSafeQ("propertyId"); int _pid = FormString.IntSafeQ("pid");//上级品牌Id,0代表第一级 IList <ComPropertyDetailsEntity> list = new List <ComPropertyDetailsEntity>(); list = ComPropertyDetailsBLL.Instance.GetListByPropertyId(_propertyId, _pid); var listfilter = list.Select( p => new { Code = p.Id, Name = p.Name }); string liststr = JsonJC.ObjectToJson(listfilter); return(liststr); }
/// <summary> /// 身份证图片上传 /// </summary> /// <returns></returns> public int IDImagesSubmit() { int _memId = FormString.IntSafeQ("MemId"); string _IDPre = FormString.SafeQ("IDPre"); string _IDBeh = FormString.SafeQ("IDBeh"); MemberInfoEntity _entity = new MemberInfoEntity(); _entity.MemId = _memId; _entity.IdentityPre = _IDPre; _entity.IdentityBeh = _IDBeh; int _result = 0; _result = MemberInfoBLL.Instance.AddMemberInfo(_entity); return(_result); }
public string GYProvinceDeleteSubmit() { ResultObj _obj = new ResultObj(); int _id = FormString.IntSafeQ("id"); int _result = GYProvinceBLL.Instance.DeleteGYProvinceByKey(_id); if (_result > 0) { _obj.Status = (int)CommonStatus.Success; _obj.Obj = _id; } else { _obj.Status = (int)CommonStatus.Fail; _obj.Obj = _id; } return(JsonJC.ObjectToJson(_obj)); }
/// <summary> /// 添加待发送短信 /// </summary> /// <returns></returns> public int AddSendMsg() { string _mobilePhone = FormString.SafeQ("mobilePhone"); string _SMSContent = FormString.SafeQ("SMSContent"); int _sendStatus = FormString.IntSafeQ("sendStatus"); int _systemType = FormString.IntSafeQ("systemType"); SMSNoticeEntity entity = new SMSNoticeEntity(); entity.MobilePhone = _mobilePhone; entity.SMSContent = _SMSContent; entity.Status = _sendStatus; entity.SystemType = _systemType; entity.SendTime = DateTime.Now.AddDays(10); entity.CreateTime = DateTime.Now; return(SMSNoticeBLL.Instance.AddSMSNotice(entity)); }
/// <summary> /// 根据询价订单产品明细查找 /// </summary> /// <returns></returns> public string GetProductAndSub() { ResultObj result = new ResultObj(); string _code = FormString.SafeQ("code"); int _orderproid = FormString.IntSafeQ("orderproid"); VWInquiryProductEntity vwproduct = InquiryProductBLL.Instance.GetVWInquiryProduct(_orderproid, false); if (vwproduct != null && vwproduct.Id > 0) { result.Status = (int)CommonStatus.Success; result.Obj = vwproduct; } else { result.Status = (int)CommonStatus.Fail; result.Obj = _orderproid; } return(JsonJC.ObjectToJson(result)); }
/// <summary> /// 获取款式图片 /// </summary> /// <returns></returns> public string GetPicList() { int _styleid = FormString.IntSafeQ("styleid");//上级品牌Id,0代表第一级 IList <ProductStylePicsEntity> list = new List <ProductStylePicsEntity>(); list = ProductStylePicsBLL.Instance.GetListByStyleId(_styleid); var listfilter = list.Select( p => new { Id = p.Id, StyleId = p.StyleId, PicUrl = p.PicUrl, PicSuffix = p.PicSuffix, HasCompress = p.HasCompress }); string liststr = JsonJC.ObjectToJson(listfilter); return(liststr); }
/// <summary> /// 品牌信息删除 /// </summary> /// <returns></returns> public string BrandDeleteSubmit() { ResultObj _obj = new ResultObj(); int _id = FormString.IntSafeQ("id"); int _result = BrandBLL.Instance.DeleteBrandByKey(_id); _result = ClassBrandBLL.Instance.DeleteClassBrandByBrandId(_id); if (_result > 0) { _obj.Status = (int)CommonStatus.Success; _obj.Obj = _id; } else { _obj.Status = (int)CommonStatus.Fail; _obj.Obj = _id; } return(JsonJC.ObjectToJson(_obj)); }
public string PayLineConfirm() { ResultObj result = new ResultObj(); int _id = FormString.IntSafeQ("id"); long _ordercode = FormString.LongIntSafeQ("ordercode"); OrderPayLineConfirmEntity entity = OrderPayLineConfirmBLL.Instance.GetPayLineConfirm(_id, _ordercode); if (entity != null && entity.Id > 0) { OrderPayLineConfirmBLL.Instance.ConfirmRecived(_id, _ordercode, memid); result.Status = (int)CommonStatus.Success; } else { result.Status = (int)CommonStatus.Fail; } return(JsonJC.ObjectToJson(result)); }
/// <summary> /// 修改待发送短信 /// </summary> /// <returns></returns> public int UpdateSendMsg() { int _id = FormString.IntSafeQ("id"); string _mobilePhone = FormString.SafeQ("mobilePhone"); string _SMSContent = FormString.SafeQ("SMSContent"); int _sendStatus = FormString.IntSafeQ("sendStatus"); int _systemType = FormString.IntSafeQ("systemType"); SMSNoticeEntity entity = SMSNoticeBLL.Instance.GetSMSNotice(_id); entity.MobilePhone = _mobilePhone; entity.SMSContent = _SMSContent; entity.Status = _sendStatus; entity.SystemType = _systemType; entity.CreateTime = DateTime.Now; entity.SendTime = DateTime.Now.AddDays(30); return(SMSNoticeBLL.Instance.UpdateSMSNotice(entity)); }
/// <summary> /// 退换货订单审核通过 /// </summary> /// <returns></returns> public int AdoptReturnApply() { int _id = FormString.IntSafeQ("returnId"); string _accepterName = FormString.SafeQ("accepterName"); string _accepterPhone = FormString.SafeQ("accepterPhone"); int _result = ReturnXSBLL.Instance.UpdateReturnXSStatus(_id, (int)ReturnOrderStatus.Adopt); if (_result > 0) { ReturnXSWLEntity entity = new ReturnXSWLEntity(); entity.AccepterName = _accepterName; entity.AccepterPhone = _accepterPhone; entity.ReturnId = _id; entity.WLTime = DateTime.Now.AddDays(30); return(ReturnXSWLBLL.Instance.AddReturnXSWL(entity)); } return(_result); }
public string UploadLicense() { int memid = CookieBLL.GetRegisterCookie(); string memcodes = ""; if (memid <= 0) { if (System.Web.HttpContext.Current.Session[CommonKey.MobileNoRegister] != null && System.Web.HttpContext.Current.Session[CommonKey.MobileYZCode] != null) { memcodes = System.Web.HttpContext.Current.Session[CommonKey.MobileNoRegister].ToString(); } } else { memcodes = memid.ToString(); ViewBag.MemId = memid; } if (!string.IsNullOrEmpty(memcodes)) { HttpFileCollection files = System.Web.HttpContext.Current.Request.Files; int aa = files.Count; int _pictype = FormString.IntSafeQ("pictype"); HttpPostedFile file = System.Web.HttpContext.Current.Request.Files[0]; CertificateType _certype = (CertificateType)_pictype; if (file != null) { byte[] bytes = null; using (var binaryReader = new BinaryReader(file.InputStream)) { bytes = binaryReader.ReadBytes(file.ContentLength); } FtpUtil _ftp = new FtpUtil(); Random _rd = new Random(); string dicpath = FilePath.PathCombine(ConfigCore.Instance.ConfigCommonEntity.FtpImagesSystemName, ImagesSysPathCode.Certifacate.ToString(), memcodes, DateTime.Now.ToString("yyyy"), DateTime.Now.ToString("MM"), DateTime.Now.ToString("dd"), _rd.Next(100000, 999999).ToString()); string dicpathfull = dicpath + file.FileName.Substring(file.FileName.LastIndexOf(".")); string certifapath = FilePath.PathCombine(ConfigCore.Instance.ConfigCommonEntity.FtpImagesRootPath, dicpathfull); _ftp.UploadFile(certifapath, bytes, true); //return dicpathfull; return("{\"jsonrpc\" : \"2.0\", \"result\" : null, \"pic_raw\" : \"" + dicpathfull + "\"}"); } } return(""); }