Exemple #1
0
 public static void OnLogin(Member member)
 {
     if (Distributor.eventHandler_2 != null)
     {
         Distributor.eventHandler_2(member, new System.EventArgs());
     }
 }
Exemple #2
0
        private void Notify_Finished(object sender, FinishedEventArgs e)
        {
            System.DateTime now = System.DateTime.Now;
            Hidistro.Membership.Context.Distributor distributor = Hidistro.Membership.Context.Users.GetUser(this.InpourRequest.UserId, false) as Hidistro.Membership.Context.Distributor;
            decimal           balance           = distributor.Balance + this.InpourRequest.InpourBlance;
            BalanceDetailInfo balanceDetailInfo = new BalanceDetailInfo();

            balanceDetailInfo.UserId    = this.InpourRequest.UserId;
            balanceDetailInfo.UserName  = distributor.Username;
            balanceDetailInfo.TradeDate = now;
            balanceDetailInfo.TradeType = TradeTypes.SelfhelpInpour;
            balanceDetailInfo.Income    = new decimal?(this.InpourRequest.InpourBlance);
            balanceDetailInfo.Balance   = balance;
            balanceDetailInfo.InpourId  = this.InpourRequest.InpourId;
            if (this.paymode != null)
            {
                balanceDetailInfo.Remark = "充值支付方式:" + this.paymode.Name;
            }
            if (SubsiteStoreHelper.Recharge(balanceDetailInfo))
            {
                Hidistro.Membership.Context.Users.ClearUserCache(distributor);
                this.ResponseStatus(true, "success");
            }
            else
            {
                SubsiteStoreHelper.RemoveInpourRequest(this.InpourId);
                this.ResponseStatus(false, "fail");
            }
        }
Exemple #3
0
 private void btnSave_Click(object sender, System.EventArgs e)
 {
     if (!this.ValidationInput())
     {
         return;
     }
     Hidistro.Membership.Context.Distributor distributor = SubsiteStoreHelper.GetDistributor();
     distributor.RealName    = this.txtRealName.Text.Trim().Replace('"', '“');
     distributor.CompanyName = this.txtCompanyName.Text.Trim();
     if (this.rsddlRegion.GetSelectedRegionId().HasValue)
     {
         distributor.RegionId    = this.rsddlRegion.GetSelectedRegionId().Value;
         distributor.TopRegionId = RegionHelper.GetTopRegionId(distributor.RegionId);
     }
     distributor.Email     = this.txtprivateEmail.Text.Trim();
     distributor.Address   = this.txtAddress.Text.Trim();
     distributor.Zipcode   = this.txtZipcode.Text.Trim();
     distributor.QQ        = this.txtQQ.Text.Trim();
     distributor.Wangwang  = this.txtWangwang.Text.Trim();
     distributor.MSN       = this.txtMSN.Text.Trim();
     distributor.TelPhone  = this.txtTel.Text.Trim();
     distributor.CellPhone = this.txtCellPhone.Text.Trim();
     distributor.IsCreate  = false;
     if (!this.ValidationDistributorRequest(distributor))
     {
         return;
     }
     if (SubsiteStoreHelper.UpdateDistributor(distributor))
     {
         this.ShowMsg("成功的修改了信息", true);
         return;
     }
     this.ShowMsg("修改失败", false);
 }
Exemple #4
0
 public static void OnRegister(Member member, UserEventArgs args)
 {
     if (Distributor.eventHandler_5 != null)
     {
         Distributor.eventHandler_5(member, args);
     }
 }
Exemple #5
0
 public static void OnFindPassword(Member member, UserEventArgs args)
 {
     if (Distributor.eventHandler_1 != null)
     {
         Distributor.eventHandler_1(member, args);
     }
 }
Exemple #6
0
 public override bool CreateDistributor(Distributor distributor)
 {
     DbCommand sqlStringCommand = this.database.GetSqlStringCommand("INSERT INTO aspnet_Distributors (UserId, GradeId, TradePassword, TradePasswordSalt, TradePasswordFormat, PurchaseOrder, Expenditure, Balance, TopRegionId, RegionId, RealName,CompanyName, Address, Zipcode, TelPhone, CellPhone, QQ, Wangwang, MSN, Remark) VALUES (@UserId, @GradeId, @TradePassword, @TradePasswordSalt, @TradePasswordFormat, @PurchaseOrder, @Expenditure, @Balance, @TopRegionId, @RegionId, @RealName,@CompanyName, @Address, @Zipcode, @TelPhone, @CellPhone, @QQ, @Wangwang, @MSN, @Remark)");
     string salt = UserHelper.CreateSalt();
     this.database.AddInParameter(sqlStringCommand, "UserId", DbType.Int32, distributor.UserId);
     this.database.AddInParameter(sqlStringCommand, "GradeId", DbType.Int32, distributor.GradeId);
     this.database.AddInParameter(sqlStringCommand, "TradePassword", DbType.String, UserHelper.EncodePassword(distributor.TradePasswordFormat, distributor.TradePassword, salt));
     this.database.AddInParameter(sqlStringCommand, "TradePasswordSalt", DbType.String, salt);
     this.database.AddInParameter(sqlStringCommand, "TradePasswordFormat", DbType.Int32, distributor.TradePasswordFormat);
     this.database.AddInParameter(sqlStringCommand, "PurchaseOrder", DbType.Int32, distributor.PurchaseOrder);
     this.database.AddInParameter(sqlStringCommand, "Expenditure", DbType.Currency, distributor.Expenditure);
     this.database.AddInParameter(sqlStringCommand, "Balance", DbType.Currency, distributor.Balance);
     this.database.AddInParameter(sqlStringCommand, "TopRegionId", DbType.Int32, distributor.TopRegionId);
     this.database.AddInParameter(sqlStringCommand, "RegionId", DbType.Int32, distributor.RegionId);
     this.database.AddInParameter(sqlStringCommand, "RealName", DbType.String, distributor.RealName);
     this.database.AddInParameter(sqlStringCommand, "CompanyName", DbType.String, distributor.CompanyName);
     this.database.AddInParameter(sqlStringCommand, "Address", DbType.String, distributor.Address);
     this.database.AddInParameter(sqlStringCommand, "Zipcode", DbType.String, distributor.Zipcode);
     this.database.AddInParameter(sqlStringCommand, "TelPhone", DbType.String, distributor.TelPhone);
     this.database.AddInParameter(sqlStringCommand, "CellPhone", DbType.String, distributor.CellPhone);
     this.database.AddInParameter(sqlStringCommand, "QQ", DbType.String, distributor.QQ);
     this.database.AddInParameter(sqlStringCommand, "Wangwang", DbType.String, distributor.Wangwang);
     this.database.AddInParameter(sqlStringCommand, "MSN", DbType.String, distributor.MSN);
     this.database.AddInParameter(sqlStringCommand, "Remark", DbType.String, distributor.Remark);
     return (this.database.ExecuteNonQuery(sqlStringCommand) == 1);
 }
Exemple #7
0
 public void OnRegister(UserEventArgs args)
 {
     if (Distributor.eventHandler_5 != null)
     {
         Distributor.eventHandler_5(this, args);
     }
 }
 private void btnEditTradePassword_Click(object sender, System.EventArgs e)
 {
     Hidistro.Membership.Context.Distributor distributor = SubsiteStoreHelper.GetDistributor();
     if (string.IsNullOrEmpty(this.txtOldTradePassword.Text))
     {
         this.ShowMsg("请输入旧交易密码", false);
         return;
     }
     if (string.IsNullOrEmpty(this.txtNewTradePassword.Text) || this.txtNewTradePassword.Text.Length > 20 || this.txtNewTradePassword.Text.Length < 6)
     {
         this.ShowMsg("交易密码不能为空,长度限制在6-20个字符之间", false);
         return;
     }
     if (this.txtNewTradePassword.Text != this.txtTradePasswordCompare.Text)
     {
         this.ShowMsg("输入的两次密码不一致", false);
         return;
     }
     if (distributor.ChangeTradePassword(this.txtOldTradePassword.Text, this.txtNewTradePassword.Text))
     {
         distributor.OnDealPasswordChanged(new Hidistro.Membership.Context.UserEventArgs(distributor.Username, null, this.txtNewTradePassword.Text));
         this.ShowMsg("交易密码修改成功", true);
         return;
     }
     this.ShowMsg("交易密码修改失败", false);
 }
Exemple #9
0
 public static void OnLogout(UserEventArgs args)
 {
     if (Distributor.eventHandler_3 != null)
     {
         Distributor.eventHandler_3(null, args);
     }
 }
Exemple #10
0
 public void OnFindPassword(UserEventArgs args)
 {
     if (Distributor.eventHandler_1 != null)
     {
         Distributor.eventHandler_1(this, args);
     }
 }
Exemple #11
0
 public void OnPasswordChanged(UserEventArgs args)
 {
     if (Distributor.eventHandler_4 != null)
     {
         Distributor.eventHandler_4(this, args);
     }
 }
Exemple #12
0
        static string ResetTradePassword(string username)
        {
            int         num;
            string      str;
            Distributor user = HiContext.Current.User as Distributor;

            if (user == null)
            {
                return(null);
            }
            string cleanString = System.Web.Security.Membership.GeneratePassword(10, 0);

            GetTradePassword(username, out num, out str);
            string str3 = UserHelper.EncodePassword((MembershipPasswordFormat)num, cleanString, str);

            if (str3.Length > 0x80)
            {
                return(null);
            }
            Database  database         = DatabaseFactory.CreateDatabase();
            DbCommand sqlStringCommand = database.GetSqlStringCommand("UPDATE distro_Members SET TradePassword = @NewTradePassword, TradePasswordSalt = @PasswordSalt, TradePasswordFormat = @PasswordFormat WHERE UserId = (SELECT UserId FROM aspnet_Users WHERE LOWER(@Username) = LoweredUserName)");

            database.AddInParameter(sqlStringCommand, "NewTradePassword", DbType.String, str3);
            database.AddInParameter(sqlStringCommand, "PasswordSalt", DbType.String, str);
            database.AddInParameter(sqlStringCommand, "PasswordFormat", DbType.Int32, num);
            database.AddInParameter(sqlStringCommand, "Username", DbType.String, username);
            database.ExecuteNonQuery(sqlStringCommand);
            return(cleanString);
        }
Exemple #13
0
 public static void OnPasswordChanged(Member member, UserEventArgs args)
 {
     if (Distributor.eventHandler_4 != null)
     {
         Distributor.eventHandler_4(member, args);
     }
 }
Exemple #14
0
 public void OnLogin()
 {
     if (Distributor.eventHandler_2 != null)
     {
         Distributor.eventHandler_2(this, new System.EventArgs());
     }
 }
Exemple #15
0
        private void btnReChargeOK_Click(object sender, System.EventArgs e)
        {
            int num = 0;

            if (this.txtReCharge.Text.Trim().IndexOf(".") > 0)
            {
                num = this.txtReCharge.Text.Trim().Substring(this.txtReCharge.Text.Trim().IndexOf(".") + 1).Length;
            }
            decimal num2;

            if (!decimal.TryParse(this.txtReCharge.Text.Trim(), out num2) || num > 2)
            {
                this.ShowMsg("本次充值要给当前客户加款的金额只能是数值,且不能超过2位小数", false);
                return;
            }
            if (num2 < -10000000m || num2 > 10000000m)
            {
                this.ShowMsg("金额大小必须在正负1000万之间", false);
                return;
            }
            Hidistro.Membership.Context.Distributor distributor = Hidistro.Membership.Context.Users.GetUser(this.userId, false) as Hidistro.Membership.Context.Distributor;
            if (distributor == null)
            {
                this.ShowMsg("此分销商已经不存在", false);
                return;
            }
            decimal           num3 = num2 + distributor.Balance;
            BalanceDetailInfo balanceDetailInfo = new BalanceDetailInfo();

            balanceDetailInfo.UserId    = this.userId;
            balanceDetailInfo.UserName  = distributor.Username;
            balanceDetailInfo.TradeDate = System.DateTime.Now;
            balanceDetailInfo.TradeType = TradeTypes.BackgroundAddmoney;
            balanceDetailInfo.Income    = new decimal?(num2);
            balanceDetailInfo.Balance   = num3;
            balanceDetailInfo.Remark    = Globals.HtmlEncode(this.txtRemarks.Text.Trim());
            ValidationResults validationResults = Validation.Validate <BalanceDetailInfo>(balanceDetailInfo, new string[]
            {
                "ValBalanceDetail"
            });
            string text = string.Empty;

            if (!validationResults.IsValid)
            {
                foreach (ValidationResult current in (System.Collections.Generic.IEnumerable <ValidationResult>)validationResults)
                {
                    text += Formatter.FormatErrorMessage(current.Message);
                }
                this.ShowMsg(text, false);
                return;
            }
            if (DistributorHelper.AddBalance(balanceDetailInfo, num2))
            {
                this.Page.ClientScript.RegisterClientScriptBlock(base.GetType(), "success", string.Format("<script>alert(\"本次充值已成功,充值金额:{0}\");window.location.href=\"DistributorReCharge.aspx?userId={1}\"</script>", num2, this.userId));
            }
            this.txtReCharge.Text        = string.Empty;
            this.txtRemarks.Text         = string.Empty;
            this.lblUseableBalance.Money = num3;
        }
Exemple #16
0
 private void btnSetPassword_Click(object sender, System.EventArgs e)
 {
     Hidistro.Membership.Core.IUser user = Hidistro.Membership.Context.Users.FindUserByUsername(this.txtUserName.Text.Trim());
     if (string.IsNullOrEmpty(this.txtPassword.Text.Trim()) || string.IsNullOrEmpty(this.txtRePassword.Text.Trim()))
     {
         this.ShowMessage("密码不允许为空!", false);
     }
     else
     {
         if (this.txtPassword.Text.Trim() != this.txtRePassword.Text.Trim())
         {
             this.ShowMessage("两次输入的密码需一致", false);
         }
         else
         {
             if (this.txtPassword.Text.Length < System.Web.Security.Membership.Provider.MinRequiredPasswordLength || this.txtPassword.Text.Length > HiConfiguration.GetConfig().PasswordMaxLength)
             {
                 this.ShowMessage(string.Format("密码的长度只能在{0}和{1}个字符之间", System.Web.Security.Membership.Provider.MinRequiredPasswordLength, HiConfiguration.GetConfig().PasswordMaxLength), false);
             }
             else
             {
                 bool flag = false;
                 if (this.dropType.SelectedIndex == 0)
                 {
                     flag = user.ChangePasswordWithAnswer(this.txtUserAnswer.Text, this.txtPassword.Text);
                 }
                 else
                 {
                     if (user is Hidistro.Membership.Context.Member)
                     {
                         Hidistro.Membership.Context.Member member = user as Hidistro.Membership.Context.Member;
                         flag = member.ChangePasswordWithoutAnswer(this.txtPassword.Text);
                     }
                     else
                     {
                         if (user is Hidistro.Membership.Context.Distributor)
                         {
                             Hidistro.Membership.Context.Distributor distributor = user as Hidistro.Membership.Context.Distributor;
                             //flag = distributor.ChangePasswordWithoutAnswer(this.txtPassword.Text);
                         }
                         else
                         {
                             flag = user.ChangePassword(this.txtPassword.Text);
                         }
                     }
                 }
                 if (flag)
                 {
                     Messenger.UserPasswordForgotten(user, this.txtPassword.Text);
                     this.Page.Response.Redirect(Globals.GetSiteUrls().UrlData.FormatUrl("ForgotPasswordSuccess") + string.Format("?UserName={0}", user.Username));
                 }
                 else
                 {
                     this.ShowMessage("登录密码修改失败,请重试", false);
                 }
             }
         }
     }
 }
Exemple #17
0
 private void btnSendMobile_Click(object sender, System.EventArgs e)
 {
     Hidistro.Membership.Context.SiteSettings siteSettings = Hidistro.Membership.Context.HiContext.Current.SiteSettings;
     Hidistro.Membership.Core.IUser           user         = Hidistro.Membership.Context.Users.FindUserByUsername(this.txtUserName.Text.Trim());
     if (user is Hidistro.Membership.Context.Member)
     {
         Hidistro.Membership.Context.Member member = user as Hidistro.Membership.Context.Member;
         ForgotPassword.mobileCode = Hidistro.Membership.Context.HiContext.Current.CreateVerifyCode(6);
         string     text;
         SendStatus sendStatus = Messenger.SendSMS(member.CellPhone, "您本次的验证码是:" + ForgotPassword.mobileCode, siteSettings, out text);
         if (sendStatus == SendStatus.NoProvider || sendStatus == SendStatus.ConfigError)
         {
             this.ShowMessage("后台设置错误,请自行联系后台管理员", false);
         }
         else
         {
             if (sendStatus == SendStatus.Fail)
             {
                 this.ShowMessage("发送失败", false);
             }
             else
             {
                 if (sendStatus == SendStatus.Success)
                 {
                     this.ShowMessage("发送成功", true);
                 }
             }
         }
     }
     else
     {
         if (user is Hidistro.Membership.Context.Distributor)
         {
             Hidistro.Membership.Context.Distributor distributor = user as Hidistro.Membership.Context.Distributor;
             ForgotPassword.mobileCode = Hidistro.Membership.Context.HiContext.Current.CreateVerifyCode(6);
             string     text;
             SendStatus sendStatus = Messenger.SendSMS(distributor.CellPhone, "您本次的验证码是:" + ForgotPassword.mobileCode, siteSettings, out text);
             if (sendStatus == SendStatus.NoProvider || sendStatus == SendStatus.ConfigError)
             {
                 this.ShowMessage("后台设置错误,请自行联系后台管理员", false);
             }
             else
             {
                 if (sendStatus == SendStatus.Fail)
                 {
                     this.ShowMessage("发送失败", false);
                 }
                 else
                 {
                     if (sendStatus == SendStatus.Success)
                     {
                         this.ShowMessage("发送成功", true);
                     }
                 }
             }
         }
     }
 }
Exemple #18
0
        private void BindLabels()
        {
            Hidistro.Membership.Context.Distributor distributor = SubsiteStoreHelper.GetDistributor();
            this.ltrAdminName.Text = distributor.Username;
            this.lblTime.Time      = distributor.LastLoginDate;
            AccountSummaryInfo myAccountSummary = SubsiteStoreHelper.GetMyAccountSummary();

            this.lblDistrosBalanceTotal.Text = ((myAccountSummary.AccountAmount > 0m) ? Globals.FormatMoney(myAccountSummary.AccountAmount) : string.Empty);
        }
Exemple #19
0
 private Hidistro.Membership.Context.Distributor GetDistributor(string name)
 {
     Hidistro.Membership.Context.Distributor result = null;
     if (name.Length >= 2 && name.Length <= 20)
     {
         result = (Hidistro.Membership.Context.Users.FindUserByUsername(name) as Hidistro.Membership.Context.Distributor);
     }
     return(result);
 }
Exemple #20
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!string.IsNullOrEmpty(base.Request["showMessage"]) && base.Request["showMessage"] == "true")
     {
         int distributorUserId = 0;
         if (string.IsNullOrEmpty(base.Request["userId"]) || !int.TryParse(base.Request["userId"], out distributorUserId))
         {
             base.Response.Write("{\"Status\":\"0\"}");
             base.Response.End();
             return;
         }
         Hidistro.Membership.Context.SiteSettings siteSettings = Hidistro.Membership.Context.SettingsManager.GetSiteSettings(distributorUserId);
         if (siteSettings == null)
         {
             base.Response.Write("{\"Status\":\"0\"}");
             base.Response.End();
             return;
         }
         Hidistro.Membership.Context.Distributor distributor = DistributorHelper.GetDistributor(siteSettings.UserId.Value);
         if (distributor == null)
         {
             base.Response.Write("{\"Status\":\"0\"}");
             base.Response.End();
             return;
         }
         System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
         stringBuilder.AppendFormat(",\"UserName\":\"{0}\"", distributor.Username);
         stringBuilder.AppendFormat(",\"RealName\":\"{0}\"", distributor.RealName);
         stringBuilder.AppendFormat(",\"CompanyName\":\"{0}\"", distributor.CompanyName);
         stringBuilder.AppendFormat(",\"Email\":\"{0}\"", distributor.Email);
         stringBuilder.AppendFormat(",\"Area\":\"{0}\"", RegionHelper.GetFullRegion(distributor.RegionId, string.Empty));
         stringBuilder.AppendFormat(",\"Address\":\"{0}\"", distributor.Address);
         stringBuilder.AppendFormat(",\"QQ\":\"{0}\"", distributor.QQ);
         stringBuilder.AppendFormat(",\"MSN\":\"{0}\"", distributor.MSN);
         stringBuilder.AppendFormat(",\"PostCode\":\"{0}\"", distributor.Zipcode);
         stringBuilder.AppendFormat(",\"Wangwang\":\"{0}\"", distributor.Wangwang);
         stringBuilder.AppendFormat(",\"CellPhone\":\"{0}\"", distributor.CellPhone);
         stringBuilder.AppendFormat(",\"Telephone\":\"{0}\"", distributor.TelPhone);
         stringBuilder.AppendFormat(",\"RegisterDate\":\"{0}\"", distributor.CreateDate);
         stringBuilder.AppendFormat(",\"LastLoginDate\":\"{0}\"", distributor.LastLoginDate);
         stringBuilder.AppendFormat(",\"Domain1\":\"{0}\"", siteSettings.SiteUrl);
         base.Response.Clear();
         base.Response.ContentType = "application/json";
         base.Response.Write("{\"Status\":\"1\"" + stringBuilder.ToString() + "}");
         base.Response.End();
     }
     this.grdDistributorSites.RowDataBound += new System.Web.UI.WebControls.GridViewRowEventHandler(this.grdDistributorSites_RowDataBound);
     this.grdDistributorSites.RowCommand   += new System.Web.UI.WebControls.GridViewCommandEventHandler(this.grdDistributorSites_RowCommand);
     this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
     this.btnSave.Click   += new System.EventHandler(this.btnSave_Click);
     this.LoadParameters();
     if (!base.IsPostBack)
     {
         this.litServerIp.Text = base.Request.ServerVariables.Get("Local_Addr");
         this.BindSites();
     }
 }
Exemple #21
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!base.IsPostBack)
     {
         AccountSummaryInfo myAccountSummary = SubsiteStoreHelper.GetMyAccountSummary();
         this.lblUseableBalance.Money = myAccountSummary.UseableBalance;
         Hidistro.Membership.Context.Distributor distributor = SubsiteStoreHelper.GetDistributor();
         this.litRealName.Text = distributor.RealName;
     }
 }
Exemple #22
0
 public static bool AcceptDistributorRequest(Distributor distributor, IList<int> lineIds)
 {
     if (Users.UpdateUser(distributor))
     {
         DistributorProvider.Instance().AddDistributorProductLines(distributor.UserId, lineIds);
         EventLogs.WriteOperationLog(Privilege.DistributorRequests, string.Format(CultureInfo.InvariantCulture, "接受了用户名为 “{0}” 的分销商", new object[] { distributor.Username }));
         return true;
     }
     return false;
 }
 private void LoadControl()
 {
     Hidistro.Membership.Context.Distributor distributor = DistributorHelper.GetDistributor(this.userId);
     if (distributor == null)
     {
         base.GotoResourceNotFound();
         return;
     }
     this.litUserName.Text = distributor.Username;
     this.WangWangConversations.WangWangAccounts = distributor.Wangwang;
 }
Exemple #24
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!base.IsPostBack)
     {
         Hidistro.Membership.Context.Distributor distributor = SubsiteStoreHelper.GetDistributor();
         if (distributor != null && distributor.UserRole == Hidistro.Membership.Core.Enums.UserRole.Distributor)
         {
             this.BindData(distributor);
         }
     }
 }
Exemple #25
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!string.IsNullOrEmpty(base.Request["showMessage"]) && base.Request["showMessage"] == "true")
     {
         int requestId = 0;
         if (string.IsNullOrEmpty(base.Request["requestId"]) || !int.TryParse(base.Request["requestId"], out requestId))
         {
             base.Response.Write("{\"Status\":\"0\"}");
             base.Response.End();
             return;
         }
         SiteRequestInfo siteRequestInfo = DistributorHelper.GetSiteRequestInfo(requestId);
         if (siteRequestInfo == null)
         {
             base.GotoResourceNotFound();
             return;
         }
         Hidistro.Membership.Context.Distributor distributor = DistributorHelper.GetDistributor(siteRequestInfo.UserId);
         if (distributor == null)
         {
             base.Response.Write("{\"Status\":\"0\"}");
             base.Response.End();
             return;
         }
         System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
         stringBuilder.AppendFormat(",\"UserName\":\"{0}\"", distributor.Username);
         stringBuilder.AppendFormat(",\"RealName\":\"{0}\"", distributor.RealName);
         stringBuilder.AppendFormat(",\"CompanyName\":\"{0}\"", distributor.CompanyName);
         stringBuilder.AppendFormat(",\"Email\":\"{0}\"", distributor.Email);
         stringBuilder.AppendFormat(",\"Area\":\"{0}\"", RegionHelper.GetFullRegion(distributor.RegionId, string.Empty));
         stringBuilder.AppendFormat(",\"Address\":\"{0}\"", distributor.Address);
         stringBuilder.AppendFormat(",\"QQ\":\"{0}\"", distributor.QQ);
         stringBuilder.AppendFormat(",\"MSN\":\"{0}\"", distributor.MSN);
         stringBuilder.AppendFormat(",\"PostCode\":\"{0}\"", distributor.Zipcode);
         stringBuilder.AppendFormat(",\"Wangwang\":\"{0}\"", distributor.Wangwang);
         stringBuilder.AppendFormat(",\"CellPhone\":\"{0}\"", distributor.CellPhone);
         stringBuilder.AppendFormat(",\"Telephone\":\"{0}\"", distributor.TelPhone);
         stringBuilder.AppendFormat(",\"RegisterDate\":\"{0}\"", distributor.CreateDate);
         stringBuilder.AppendFormat(",\"LastLoginDate\":\"{0}\"", distributor.LastLoginDate);
         stringBuilder.AppendFormat(",\"Domain1\":\"{0}\"", siteRequestInfo.FirstSiteUrl);
         base.Response.Clear();
         base.Response.ContentType = "application/json";
         base.Response.Write("{\"Status\":\"1\"" + stringBuilder.ToString() + "}");
         base.Response.End();
     }
     this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
     this.btnSave.Click   += new System.EventHandler(this.btnSave_Click);
     this.btnRefuse.Click += new System.EventHandler(this.btnRefuse_Click);
     this.LoadParameters();
     if (!this.Page.IsPostBack)
     {
         this.BindRequests();
     }
 }
Exemple #26
0
        public override bool ChangeTradePassword(string username, string newPassword)
        {
            Distributor user = HiContext.Current.User as Distributor;

            if (user == null)
            {
                return(false);
            }
            string oldPassword = this.ResetTradePassword(username);

            return(this.ChangeTradePassword(username, oldPassword, newPassword));
        }
Exemple #27
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.LoadMenu();
         Hidistro.Membership.Context.SiteSettings siteSettings = Hidistro.Membership.Context.SettingsManager.GetSiteSettings(Hidistro.Membership.Context.HiContext.Current.User.UserId);
         if (siteSettings == null)
         {
             this.hlinkHome.NavigateUrl  = Globals.GetSiteUrls().Home;
             this.hpkDefault.NavigateUrl = "nositedefault.aspx";
             siteSettings = Hidistro.Membership.Context.SettingsManager.GetMasterSettings(true);
             if (!string.IsNullOrEmpty(siteSettings.LogoUrl))
             {
                 this.imgLogo.ImageUrl = siteSettings.LogoUrl;
             }
         }
         else
         {
             this.hlinkHome.NavigateUrl  = "http://" + siteSettings.SiteUrl + Globals.GetSiteUrls().Home;
             this.hpkDefault.NavigateUrl = "Default.aspx";
             if (!string.IsNullOrEmpty(siteSettings.LogoUrl))
             {
                 this.imgLogo.ImageUrl = siteSettings.LogoUrl;
             }
         }
         this.hlinkLogout.NavigateUrl = Globals.ApplicationPath + "/Logout.aspx";
         int isReadMessageToAdmin = SubsiteCommentsHelper.GetIsReadMessageToAdmin();
         if (isReadMessageToAdmin > 0)
         {
             this.hp_message.Style.Add("color", "red");
             this.hp_message.InnerText = "站内信(" + isReadMessageToAdmin.ToString() + ")";
         }
         Hidistro.Membership.Context.Distributor distributor = Hidistro.Membership.Context.HiContext.Current.User as Hidistro.Membership.Context.Distributor;
         if (distributor != null)
         {
             this.lblUserName.Text = "欢迎您," + distributor.Username;
             Hidistro.Membership.Context.SiteSettings masterSettings = Hidistro.Membership.Context.SettingsManager.GetMasterSettings(false);
             this.hlinkToTaobao.NavigateUrl = string.Format("http://order1.kuaidiangtong.com/TaoBaoApi.aspx?Host={0}&ApplicationPath={1}&DistributorUserId={2}&Email={3}&RealName={4}&CompanyName={5}&Address={6}&TelPhone={7}&QQ={8}&Wangwang={9}", new object[]
             {
                 masterSettings.SiteUrl,
                 Globals.ApplicationPath,
                 distributor.UserId,
                 distributor.Email,
                 distributor.RealName,
                 distributor.CompanyName,
                 distributor.Address,
                 distributor.TelPhone,
                 distributor.QQ,
                 distributor.Wangwang
             });
         }
     }
 }
Exemple #28
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     this.grdPurchaseOrders.RowDataBound += new System.Web.UI.WebControls.GridViewRowEventHandler(this.grdPurchaseOrders_RowDataBound);
     this.btnClosePurchaseOrder.Click    += new System.EventHandler(this.btnClosePurchaseOrder_Click);
     if (!base.IsPostBack)
     {
         Hidistro.Membership.Context.Distributor distributor = SubsiteStoreHelper.GetDistributor();
         this.ltrAdminName.Text = distributor.Username;
         this.lblTime.Time      = distributor.LastLoginDate;
         this.BindPurchaseOrders();
     }
 }
Exemple #29
0
        private void btnConfirmPay_Click(object sender, System.EventArgs e)
        {
            if (string.IsNullOrEmpty(this.txtTradePassword.Text))
            {
                this.ShowMsg("请输入交易密码", false);
                return;
            }
            int modeId;

            int.TryParse(base.Request["PayMode"], out modeId);
            SubsiteStoreHelper.GetPaymentMode(modeId);
            if ((decimal)this.lblUseableBalance.Money < (decimal)this.lblTotalPrice.Money)
            {
                this.ShowMsg("您的预付款金额不足", false);
                return;
            }
            Hidistro.Membership.Context.Distributor distributor = SubsiteStoreHelper.GetDistributor();
            if (distributor.Balance - distributor.RequestBalance < this.purchaseOrder.GetPurchaseTotal())
            {
                this.ShowMsg("您的预付款金额不足", false);
                return;
            }
            BalanceDetailInfo balanceDetailInfo = new BalanceDetailInfo();

            balanceDetailInfo.UserId    = distributor.UserId;
            balanceDetailInfo.UserName  = distributor.Username;
            balanceDetailInfo.TradeType = TradeTypes.Consume;
            balanceDetailInfo.TradeDate = System.DateTime.Now;
            balanceDetailInfo.Expenses  = new decimal?(this.purchaseOrder.GetPurchaseTotal());
            balanceDetailInfo.Balance   = distributor.Balance - this.purchaseOrder.GetPurchaseTotal();
            balanceDetailInfo.Remark    = string.Format("采购单{0}的付款", this.purchaseOrder.PurchaseOrderId);
            distributor.TradePassword   = this.txtTradePassword.Text;
            if (!Hidistro.Membership.Context.Users.ValidTradePassword(distributor))
            {
                this.ShowMsg("交易密码错误", false);
                return;
            }
            if (!SubsiteSalesHelper.ConfirmPay(balanceDetailInfo, this.purchaseOrder))
            {
                this.ShowMsg("付款失败", false);
                return;
            }
            SubsiteSalesHelper.SavePurchaseDebitNote(new PurchaseDebitNote
            {
                NoteId          = Globals.GetGenerateId(),
                PurchaseOrderId = this.purchaseOrderId,
                Operator        = Hidistro.Membership.Context.HiContext.Current.User.Username,
                Remark          = "分销商采购单预付款支付成功"
            });
            this.ShowMsg("采购单预付款支付成功", true);
        }
Exemple #30
0
 private void BindData(Hidistro.Membership.Context.Distributor distributor)
 {
     this.txtRealName.Text     = distributor.RealName;
     this.txtCompanyName.Text  = distributor.CompanyName;
     this.txtprivateEmail.Text = distributor.Email;
     this.txtAddress.Text      = distributor.Address;
     this.txtZipcode.Text      = distributor.Zipcode;
     this.txtQQ.Text           = distributor.QQ;
     this.txtWangwang.Text     = distributor.Wangwang;
     this.txtMSN.Text          = distributor.MSN;
     this.txtTel.Text          = distributor.TelPhone;
     this.txtCellPhone.Text    = distributor.CellPhone;
     this.rsddlRegion.SetSelectedRegionId(new int?(distributor.RegionId));
 }
 private void BindData(Distributor distributor)
 {
     txtRealName.Text = distributor.RealName;
     txtCompanyName.Text = distributor.CompanyName;
     txtprivateEmail.Text = distributor.Email;
     txtAddress.Text = distributor.Address;
     txtZipcode.Text = distributor.Zipcode;
     txtQQ.Text = distributor.QQ;
     txtWangwang.Text = distributor.Wangwang;
     txtMSN.Text = distributor.MSN;
     txtTel.Text = distributor.TelPhone;
     txtCellPhone.Text = distributor.CellPhone;
     rsddlRegion.SetSelectedRegionId(new int?(distributor.RegionId));
 }
 private bool ValidationDistributor(Distributor distributor)
 {
     ValidationResults results = Hishop.Components.Validation.Validation.Validate<Distributor>(distributor, new string[] { "ValDistributor" });
     string msg = string.Empty;
     if (!results.IsValid)
     {
         foreach (ValidationResult result in (IEnumerable<ValidationResult>)results)
         {
             msg = msg + Formatter.FormatErrorMessage(result.Message);
         }
         ShowMsg(msg, false);
     }
     return results.IsValid;
 }
 private void LoadControl()
 {
     Hidistro.Membership.Context.Distributor distributor = DistributorHelper.GetDistributor(this.userId);
     if (distributor == null)
     {
         base.GotoResourceNotFound();
         return;
     }
     this.litUserName.Text = distributor.Username;
     this.WangWangConversations.WangWangAccounts = distributor.Wangwang;
     this.drpDistributorGrade.SelectedValue      = new int?(distributor.GradeId);
     this.txtRemark.Text = distributor.Remark;
     System.Collections.Generic.IList <int> distributorProductLines = DistributorHelper.GetDistributorProductLines(this.userId);
     this.chkListProductLine.SelectedValue = distributorProductLines;
 }
Exemple #34
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (string.IsNullOrEmpty(base.Request["purchaseorderIds"]))
     {
         return;
     }
     this.purchaseorderIds = base.Request["purchaseorderIds"].Trim(new char[]
     {
         ','
     });
     this.lblTotalPrice.Money = this.GetPayTotal();
     Hidistro.Membership.Context.Distributor distributor = SubsiteStoreHelper.GetDistributor();
     this.lblUseableBalance.Money = distributor.Balance - distributor.RequestBalance;
     this.btnConfirmPay.Click    += new System.EventHandler(this.btnConfirmPay_Click);
     this.imgBtnBack.Click       += new System.Web.UI.ImageClickEventHandler(this.btnBack_Click);
 }
Exemple #35
0
 public static bool UpdateDistributor(Distributor distributor)
 {
     Globals.EntityCoding(distributor, true);
     return Users.UpdateUser(distributor);
 }
Exemple #36
0
 public override IList<Distributor> GetDistributorsByRank(int? gradeId)
 {
     DbCommand sqlStringCommand;
     IList<Distributor> list = new List<Distributor>();
     if (gradeId > 0)
     {
         sqlStringCommand = database.GetSqlStringCommand("SELECT * FROM vw_aspnet_Distributors WHERE GradeId=@GradeId");
         database.AddInParameter(sqlStringCommand, "GradeId", DbType.Int32, gradeId);
     }
     else
     {
         sqlStringCommand = database.GetSqlStringCommand("SELECT * FROM vw_aspnet_Distributors");
     }
     using (IDataReader reader = database.ExecuteReader(sqlStringCommand))
     {
         while (reader.Read())
         {
             Distributor item = new Distributor();
             item.UserId = (int)reader["UserId"];
             item.Email = reader["Email"].ToString();
             item.Username = reader["UserName"].ToString();
             list.Add(item);
         }
     }
     return list;
 }
Exemple #37
0
 public override IList<Distributor> GetDistributors()
 {
     DbCommand sqlStringCommand = database.GetSqlStringCommand("SELECT * FROM vw_aspnet_Distributors");
     IList<Distributor> list = new List<Distributor>();
     using (IDataReader reader = database.ExecuteReader(sqlStringCommand))
     {
         Distributor item = null;
         while (reader.Read())
         {
             item = new Distributor();
             item.UserId = (int)reader["UserId"];
             item.Username = (string)reader["UserName"];
             list.Add(item);
         }
     }
     return list;
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     orderIds = Page.Request.QueryString["orderIds"];
     if (string.IsNullOrEmpty(orderIds))
     {
         litmsg.Text = "没有要转换的订单";
     }
     else
     {
         int result = 0;
         int.TryParse(Page.Request.QueryString["shippingModeId"], out result);
         shippingMode = SubsiteSalesHelper.GetShippingMode(result, true);
         if (shippingMode == null)
         {
             litmsg.Text = "没有选择配送方式";
         }
         else
         {
             distributor = HiContext.Current.User as Hidistro.Membership.Context.Distributor;
             cookie = HiContext.Current.Context.Request.Cookies["TopSession_" + HiContext.Current.User.UserId.ToString()];
             string serverUrl = "http://gw.api.taobao.com/router/rest";
             SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
             string appKey = Cryptographer.Decrypt(masterSettings.Topkey);
             string appSecret = Cryptographer.Decrypt(masterSettings.TopSecret);
             client = new DefaultTopClient(serverUrl, appKey, appSecret, "json");
             TradeFullinfoGetRequest request2 = new TradeFullinfoGetRequest();
             request2.Fields = "tid,receiver_name,receiver_state,payment,receiver_district,receiver_city,receiver_address,receiver_phone,receiver_zip,receiver_mobile,post_fee,adjust_fee,total_fee,orders";
             TradeFullinfoGetRequest request = request2;
             string[] strArray = orderIds.Split(new char[] { ',' });
             int count = 0;
             decimal expenditure = 0M;
             foreach (string str4 in strArray)
             {
                 request.Tid = new long?(long.Parse(str4));
                 TradeFullinfoGetResponse response = client.Execute<TradeFullinfoGetResponse>(request, cookie.Value);
                 if (!response.IsError)
                 {
                     try
                     {
                         PurchaseOrderInfo purchaseOrder = GetPurchaseOrder(response.Trade);
                         if ((purchaseOrder != null) && SubsiteSalesHelper.CreatePurchaseOrder(purchaseOrder))
                         {
                             expenditure += purchaseOrder.OrderTotal;
                             count++;
                         }
                     }
                     catch
                     {
                         litmsg.Text = "生成采购单发生错误,请重新尝试";
                     }
                 }
             }
             if (count > 0)
             {
                 SendHttpRequest(count, expenditure);
                 litmsg.Text = string.Format("你选择的{0}淘宝订单已经成功的转换了{1}个采购单", strArray.Length, count);
             }
             else
             {
                 litmsg.Text = "生成采购单失败,可能您选择的淘宝订单在系统中没有找到对应的商品";
             }
         }
     }
 }
Exemple #39
0
 public override Distributor GetDistributor(HiMembershipUser membershipUser)
 {
     Distributor distributor = null;
     DbCommand sqlStringCommand = this.database.GetSqlStringCommand("SELECT * FROM aspnet_Distributors WHERE UserId = @UserId");
     this.database.AddInParameter(sqlStringCommand, "UserId", DbType.Int32, membershipUser.UserId);
     using (IDataReader reader = this.database.ExecuteReader(sqlStringCommand))
     {
         if (!reader.Read())
         {
             return distributor;
         }
         distributor = new Distributor(membershipUser)
         {
             GradeId = (int)reader["GradeId"],
             TradePassword = (string)reader["TradePassword"],
             TradePasswordFormat = (MembershipPasswordFormat)((int)reader["TradePasswordFormat"]),
             PurchaseOrder = (int)reader["PurchaseOrder"],
             Expenditure = (decimal)reader["Expenditure"],
             Balance = (decimal)reader["Balance"],
             RequestBalance = (decimal)reader["RequestBalance"],
             MemberCount = (int)reader["MemberCount"]
         };
         if (reader["TopRegionId"] != DBNull.Value)
         {
             distributor.TopRegionId = (int)reader["TopRegionId"];
         }
         if (reader["RegionId"] != DBNull.Value)
         {
             distributor.RegionId = (int)reader["RegionId"];
         }
         if (reader["RealName"] != DBNull.Value)
         {
             distributor.RealName = (string)reader["RealName"];
         }
         if (reader["CompanyName"] != DBNull.Value)
         {
             distributor.CompanyName = (string)reader["CompanyName"];
         }
         if (reader["Address"] != DBNull.Value)
         {
             distributor.Address = (string)reader["Address"];
         }
         if (reader["Zipcode"] != DBNull.Value)
         {
             distributor.Zipcode = (string)reader["Zipcode"];
         }
         if (reader["TelPhone"] != DBNull.Value)
         {
             distributor.TelPhone = (string)reader["TelPhone"];
         }
         if (reader["CellPhone"] != DBNull.Value)
         {
             distributor.CellPhone = (string)reader["CellPhone"];
         }
         if (reader["QQ"] != DBNull.Value)
         {
             distributor.QQ = (string)reader["QQ"];
         }
         if (reader["Wangwang"] != DBNull.Value)
         {
             distributor.Wangwang = (string)reader["Wangwang"];
         }
         if (reader["MSN"] != DBNull.Value)
         {
             distributor.MSN = (string)reader["MSN"];
         }
         if (reader["Remark"] != DBNull.Value)
         {
             distributor.Remark = (string)reader["Remark"];
         }
     }
     return distributor;
 }
Exemple #40
0
 public override bool UpdateDistributor(Distributor distributor)
 {
     DbCommand sqlStringCommand = this.database.GetSqlStringCommand("UPDATE aspnet_Distributors SET GradeId = @GradeId, TradePassword = @TradePassword, TradePasswordSalt = @TradePasswordSalt, TradePasswordFormat = @TradePasswordFormat, TopRegionId = @TopRegionId, RegionId = @RegionId, RealName = @RealName,CompanyName=@CompanyName, Address = @Address, Zipcode = @Zipcode, TelPhone = @TelPhone, CellPhone = @CellPhone, QQ = @QQ, Wangwang = @Wangwang, MSN = @MSN, Remark=@Remark WHERE UserId = @UserId");
     string salt = UserHelper.CreateSalt();
     this.database.AddInParameter(sqlStringCommand, "UserId", DbType.Int32, distributor.UserId);
     this.database.AddInParameter(sqlStringCommand, "GradeId", DbType.Int32, distributor.GradeId);
     this.database.AddInParameter(sqlStringCommand, "TradePassword", DbType.String, UserHelper.EncodePassword(distributor.TradePasswordFormat, distributor.TradePassword, salt));
     this.database.AddInParameter(sqlStringCommand, "TradePasswordSalt", DbType.String, salt);
     this.database.AddInParameter(sqlStringCommand, "TradePasswordFormat", DbType.Int32, distributor.TradePasswordFormat);
     this.database.AddInParameter(sqlStringCommand, "TopRegionId", DbType.Int32, distributor.TopRegionId);
     this.database.AddInParameter(sqlStringCommand, "RegionId", DbType.Int32, distributor.RegionId);
     this.database.AddInParameter(sqlStringCommand, "RealName", DbType.String, distributor.RealName);
     this.database.AddInParameter(sqlStringCommand, "CompanyName", DbType.String, distributor.CompanyName);
     this.database.AddInParameter(sqlStringCommand, "Address", DbType.String, distributor.Address);
     this.database.AddInParameter(sqlStringCommand, "Zipcode", DbType.String, distributor.Zipcode);
     this.database.AddInParameter(sqlStringCommand, "TelPhone", DbType.String, distributor.TelPhone);
     this.database.AddInParameter(sqlStringCommand, "CellPhone", DbType.String, distributor.CellPhone);
     this.database.AddInParameter(sqlStringCommand, "QQ", DbType.String, distributor.QQ);
     this.database.AddInParameter(sqlStringCommand, "Wangwang", DbType.String, distributor.Wangwang);
     this.database.AddInParameter(sqlStringCommand, "MSN", DbType.String, distributor.MSN);
     this.database.AddInParameter(sqlStringCommand, "Remark", DbType.String, distributor.Remark);
     return (this.database.ExecuteNonQuery(sqlStringCommand) == 1);
 }
Exemple #41
0
 public static CreateUserStatus CreateDistributor(Distributor distributor)
 {
     return Users.CreateUser(distributor, HiContext.Current.Config.RolesConfiguration.Distributor);
 }
Exemple #42
0
 public static LoginUserStatus ValidLogin(Distributor distributor)
 {
     if (distributor == null)
     {
         return LoginUserStatus.InvalidCredentials;
     }
     return Users.ValidateUser(distributor);
 }
Exemple #43
0
        void btnOK_Click(object sender, EventArgs e)
        {
            if (ValidationInput())
            {
                int? selectedRegionId = dropRegion.GetSelectedRegionId();
                HiMembershipUser membershipUser = new HiMembershipUser(false, UserRole.Distributor);
                Distributor distributor = new Distributor(membershipUser);
                distributor.IsApproved = false;
                distributor.Username = txtUserName.Text;
                distributor.Email = txtEmail.Text;
                distributor.Password = txtPasswordCompare.Text;
                if (!string.IsNullOrEmpty(txtTransactionPasswordCompare.Text))
                {
                    distributor.TradePassword = txtTransactionPasswordCompare.Text;
                }
                else
                {
                    distributor.TradePassword = distributor.Password;
                }
                distributor.RealName = txtRealName.Text;
                distributor.CompanyName = txtCompanyName.Text;
                if (selectedRegionId.HasValue)
                {
                    distributor.RegionId = selectedRegionId.Value;
                    distributor.TopRegionId = RegionHelper.GetTopRegionId(distributor.RegionId);
                }
                distributor.Address = txtAddress.Text;
                distributor.Zipcode = txtZipcode.Text;
                distributor.QQ = txtQQ.Text;
                distributor.Wangwang = txtWangwang.Text;
                distributor.MSN = txtMSN.Text;
                distributor.TelPhone = txtTelPhone.Text;
                distributor.CellPhone = txtCellPhone.Text;
                distributor.Remark = string.Empty;
                if (ValidationDistributorRequest(distributor))
                {
                    switch (SubsiteStoreHelper.CreateDistributor(distributor))
                    {
                        case CreateUserStatus.UnknownFailure:
                            ShowMessage("未知错误", false);
                            return;

                        case CreateUserStatus.Created:
                            distributor.ChangePasswordQuestionAndAnswer(null, txtPasswordQuestion.Text, txtPasswordAnswer.Text);
                            Messenger.UserRegister(distributor, txtPasswordCompare.Text);
                            distributor.OnRegister(new UserEventArgs(distributor.Username, txtPasswordCompare.Text, null));
                            Page.Response.Redirect(Globals.ApplicationPath + "/Shopadmin/DistributorsRegisterComplete.aspx");
                            return;

                        case CreateUserStatus.DuplicateUsername:
                            ShowMessage("您输入的用户名已经被注册使用", false);
                            return;

                        case CreateUserStatus.DuplicateEmailAddress:
                            ShowMessage("您输入的电子邮件地址已经被注册使用", false);
                            return;

                        case CreateUserStatus.InvalidFirstCharacter:
                        case CreateUserStatus.Updated:
                        case CreateUserStatus.Deleted:
                        case CreateUserStatus.InvalidQuestionAnswer:
                            return;

                        case CreateUserStatus.DisallowedUsername:
                            ShowMessage("用户名被禁止注册", false);
                            return;

                        case CreateUserStatus.InvalidPassword:
                            ShowMessage("无效的密码", false);
                            return;

                        case CreateUserStatus.InvalidEmail:
                            ShowMessage("无效的电子邮件地址", false);
                            return;
                    }
                }
            }
        }