public ActionResult Register3() { int memid = CookieBLL.GetRegisterCookie(); if (memid > 0) { MemStoreEntity _en = StoreBLL.Instance.GetStoreByMemId(memid); if (_en != null) { MemberEntity _mementity = MemberBLL.Instance.GetMember(memid); if (_mementity.Status == (int)MemberStatus.Active) { //Response.Write("您已注册通过,请直接登录"); return(RedirectToAction("Login")); } else { ViewBag.LicensePath = _en.LicensePath; } } } else { return(RedirectToAction("Login")); } return(View()); }
public string SaveBasicMsg() { ResultObj _loginentity = new ResultObj(); int memid = CookieBLL.GetRegisterCookie(); string mobile = FormString.SafeQ("mobile"); string nikename = FormString.SafeQ("nikename"); if (memid > 0) { VWMemberEntity _mem = new VWMemberEntity(); _mem.MemId = memid; _mem.MemNikeName = nikename; int rei = MemberBLL.Instance.BasicMsgUpdate(_mem); if (rei > 0) { _loginentity.Status = (int)CommonStatus.Success; } else { _loginentity.Status = (int)CommonStatus.Fail; } } else { _loginentity.Status = (int)CommonStatus.Fail; } return(JsonJC.ObjectToJson(_loginentity)); }
public string SaveLicense() { ResultObj _loginentity = new ResultObj(); int memid = CookieBLL.GetRegisterCookie(); string path = FormString.SafeQ("licensepath"); if (memid > 0) { MemberEntity _mem = new MemberEntity(); _mem = MemberBLL.Instance.GetMember(memid); if (_mem != null && _mem.Status == (int)MemberStatus.WaitCheck) { MemberBLL.Instance.RegisterCompanyLicense(memid, path); _loginentity.Status = (int)CommonStatus.Success; } else { _loginentity.Status = (int)CommonStatus.Fail; } } else { _loginentity.Status = (int)CommonStatus.Fail; } return(JsonJC.ObjectToJson(_loginentity)); }
/// <summary> /// 上传证件 /// </summary> /// <returns></returns> public ActionResult Reg2() { int _memId = QueryString.IntSafeQ("memId"); if (_memId == 0) { _memId = CookieBLL.GetRegisterCookie(); } if (_memId > 0) { MemberInfoEntity enti = MemberInfoBLL.Instance.GetMemberInfoByMemId(_memId); if (enti != null && enti.Id > 0) { ViewBag.LegalIdentityPre = enti.IdentityPre; ViewBag.LegalIdentityBeh = enti.IdentityBeh; } ViewBag.MemId = _memId; } else { RedirectToAction("Reg"); } return(View()); }
public string Reg2Submit() { ResultObj _obj = new ResultObj(); string useraccount = FormString.SafeQ("useraccount"); string mobile = FormString.SafeQ("mobile"); string stamp = FormString.SafeQ("stamp"); string companyname = FormString.SafeQ("companyname"); int province = FormString.IntSafeQ("province"); int city = FormString.IntSafeQ("city"); int comtype = FormString.IntSafeQ("comtype"); string contractmanname = FormString.SafeQ("contractmanname"); string address = FormString.SafeQ("address", 300); MemberEntity mem = MemberBLL.Instance.GetMemByMethod(mobile, LoginMethodEnum.MobilePhone); if (mem.Status != (int)MemberStatus.Register1) { _obj.Status = (int)CommonStatus.RegisterNoModify; return(JsonJC.ObjectToJson(_obj)); } if (!(mem.TimeStampTab == stamp && CookieBLL.GetRegisterCookie() == mem.Id)) { _obj.Status = (int)CommonStatus.RegisterFail; } else { mem.MemCode = useraccount; MemberInfoEntity _meminfo = MemberInfoBLL.Instance.GetMemberInfoByMemId(mem.Id); _meminfo.MemId = mem.Id; _meminfo.Nickname = contractmanname; _meminfo.MemName = contractmanname; _meminfo.MobilePhone = mobile; MemberInfoBLL.Instance.AddMemberInfo(_meminfo); MemStoreEntity _store = new MemStoreEntity(); _store.Address = address; _store.CityId = city; _store.CompanyName = companyname; _store.ContactsManName = contractmanname; _store.CreateTime = DateTime.Now; _store.ProvinceId = province; _store.Status = (int)MemberStatus.WaitCheck; _store.StoreType = mem.StoreType; _store.MobilePhone = mobile; _store.MemId = mem.Id; ResultObj _loginentity = MemberLoginBLL.Instance.Register2(mem, _meminfo, _store); //if (_loginentity.Status == (int)CommonStatus.Success) //{ // CookieBLL.SetRegisterCookie(StringUtils.GetDbInt(_loginentity.Obj)); //} _obj = _loginentity; } return(JsonJC.ObjectToJson(_obj)); }
public ActionResult Register4() { MemBillVATEntity _en = new MemBillVATEntity(); int memid = CookieBLL.GetRegisterCookie(); if (memid > 0) { _en = MemBillVATBLL.Instance.GetMemBillVATByMemId(memid); } else { return(RedirectToAction("Login")); } ViewBag.BillEntity = _en; return(View()); }
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(""); }
public ActionResult Reg3() { int _memid = QueryString.IntSafeQ("memid"); string _stamp = QueryString.SafeQNo("stamp"); string returnurl = QueryString.SafeQNo("returnurl"); if (_memid == 0) { _memid = CookieBLL.GetRegisterCookie(); } if (_memid > 0) { VWMemberEntity member = MemberBLL.Instance.GetVWMember(_memid); if (member != null && member.MemId > 0 && member.Status == (int)MemberStatus.Register2 && member.TimeStampTab == _stamp) { ViewBag.VWMember = member; return(View()); } } return(RedirectToAction("Reg", new { returnurl = returnurl })); }
public string CompanyBillVATRegister() { ResultObj _loginentity = new ResultObj(); int memid = CookieBLL.GetRegisterCookie(); if (memid > 0) { MemberEntity _mem = MemberBLL.Instance.GetMember(memid); if (_mem != null) { if (_mem.Status == (int)MemberStatus.Active) { _loginentity.Status = (int)CommonStatus.HasAccount; } else { string companyname = FormString.SafeQ("companyname"); string companycode = FormString.SafeQ("companycode"); string companyaddress = FormString.SafeQ("companyaddress"); string companyphone = FormString.SafeQ("companyphone"); string companybank = FormString.SafeQ("companybank"); string bankaccount = FormString.SafeQ("bankaccount"); string receivername = FormString.SafeQ("receivername"); int province = FormString.IntSafeQ("province"); int city = FormString.IntSafeQ("city"); string receiverphone = FormString.SafeQ("receiverphone"); string receiveraddress = FormString.SafeQ("receiveraddress"); MemBillVATEntity _bill = new MemBillVATEntity(); _bill.BankAccount = bankaccount; _bill.BillType = (int)BillType.VAT; _bill.CompanyAddress = companyaddress; _bill.CompanyBank = companybank; _bill.CompanyCode = companycode; _bill.CompanyName = companyname; _bill.CompanyPhone = companyphone; _bill.CreateTime = DateTime.Now; _bill.MemId = memid; _bill.ReceiverAddress = receiveraddress; _bill.ReceiverCity = city; _bill.ReceiverName = receivername; _bill.ReceiverPhone = receiverphone; _bill.ReceiverProvince = province; _bill.UpdateTime = DateTime.Now; int billid = MemBillVATBLL.Instance.AddMemBillVAT(_bill); if (billid > 0) { _loginentity.Status = (int)CommonStatus.Success; } else { _loginentity.Status = (int)CommonStatus.Fail; } } } else { _loginentity.Status = (int)CommonStatus.Fail; } } else { _loginentity.Status = (int)CommonStatus.Fail; } return(JsonJC.ObjectToJson(_loginentity)); }