protected void bt_SaveResetPwd_Click(object sender, EventArgs e)
    {
        if (tbx_ConfirmPwd.Text.Length < 6)
        {
            MessageBox.Show(this, "密码长度必需大于6!");
            return;
        }

        CM_DIMembershipBLL shipbll = new CM_DIMembershipBLL((int)ViewState["ShipID"]);
        if (shipbll.Model.IsLockedOut==1)
        {
            MessageBox.Show(this, "请先解锁该帐户再修改密码!");
            return;
        }

        string pwd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(tbx_Pwd.Text, "md5");//MCSFramework.Common.DataEncrypter.EncrypteString(tbx_Pwd.Text);
        shipbll.Model.Password = pwd;
        if (shipbll.Update()<0)
        {
            MessageBox.Show(this, "输入的密码无效,密码修改失败!");
            return;
        }
        else
            MessageBox.ShowAndRedirect(this, "密码重置成功!", "DIUserList.aspx");
    }
    protected void bt_SaveResetPwd_Click(object sender, EventArgs e)
    {
        if (tbx_ConfirmPwd.Text.Length < 6)
        {
            MessageBox.Show(this, "密码长度必需大于6!");
            return;
        }

        CM_DIMembershipBLL shipbll = new CM_DIMembershipBLL((int)ViewState["ShipID"]);

        if (shipbll.Model.IsLockedOut == 1)
        {
            MessageBox.Show(this, "请先解锁该帐户再修改密码!");
            return;
        }

        string pwd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(tbx_Pwd.Text, "md5");//MCSFramework.Common.DataEncrypter.EncrypteString(tbx_Pwd.Text);

        shipbll.Model.Password = pwd;
        if (shipbll.Update() < 0)
        {
            MessageBox.Show(this, "输入的密码无效,密码修改失败!");
            return;
        }
        else
        {
            MessageBox.ShowAndRedirect(this, "密码重置成功!", "DIUserList.aspx");
        }
    }
 protected void bt_Approve_Click(object sender, EventArgs e)
 {
     CM_DIMembershipBLL shipbll = new CM_DIMembershipBLL((int)ViewState["ShipID"]);
     shipbll.Model.IsApproved = 1;
     shipbll.Update();
     BindData();
 }
    protected void bt_Approve_Click(object sender, EventArgs e)
    {
        CM_DIMembershipBLL shipbll = new CM_DIMembershipBLL((int)ViewState["ShipID"]);

        shipbll.Model.IsApproved = 1;
        shipbll.Update();
        BindData();
    }
    protected void bt_Unlock_Click(object sender, EventArgs e)
    {
        CM_DIMembershipBLL shipbll = new CM_DIMembershipBLL((int)ViewState["ShipID"]);

        shipbll.Model.IsLockedOut = 0;
        shipbll.Update();
        BindData();
    }
    protected void bt_UnApprove_Click(object sender, EventArgs e)
    {
        CM_DIMembershipBLL shipbll = new CM_DIMembershipBLL((int)ViewState["ShipID"]);

        shipbll.Model.IsApproved = 0;
        shipbll.Update();
        BindData();
        Response.Redirect("DIUserList.aspx");
    }
 protected void bt_OK_Click(object sender, EventArgs e)
 {
     CM_DIUsersBLL user = new CM_DIUsersBLL((int)Session["ClientUserID"]);
     CM_DIMembershipBLL ship = new CM_DIMembershipBLL(user.Model.ShipID);
     if (!DataEncrypter.Compare(ship.Model.Password,tbx_OrgPassword.Text))
         Literal1.Text = "原密码输入错误!";
     else
     {
         ship.Model.Password = DataEncrypter.EncrypteString(tbx_NewPassword.Text);
         ship.Update();
         Literal1.Text = "";
         tbx_NewPassword.Text = "";
         tbx_OrgPassword.Text = "";
         tbx_RePassword.Text = "";
         MessageBox.Show(this, "密码修改成功!");
     }
 }
Beispiel #8
0
    protected void bt_OK_Click(object sender, EventArgs e)
    {
        CM_DIUsersBLL      user = new CM_DIUsersBLL((int)Session["ClientUserID"]);
        CM_DIMembershipBLL ship = new CM_DIMembershipBLL(user.Model.ShipID);

        if (!DataEncrypter.Compare(ship.Model.Password, tbx_OrgPassword.Text))
        {
            Literal1.Text = "原密码输入错误!";
        }
        else
        {
            ship.Model.Password = DataEncrypter.EncrypteString(tbx_NewPassword.Text);
            ship.Update();
            Literal1.Text        = "";
            tbx_NewPassword.Text = "";
            tbx_OrgPassword.Text = "";
            tbx_RePassword.Text  = "";
            MessageBox.Show(this, "密码修改成功!");
        }
    }
 protected void bt_Unlock_Click(object sender, EventArgs e)
 {
     CM_DIMembershipBLL shipbll = new CM_DIMembershipBLL((int)ViewState["ShipID"]);
     shipbll.Model.IsLockedOut = 0;
     shipbll.Update();
     BindData();
 }
 protected void bt_UnApprove_Click(object sender, EventArgs e)
 {
     CM_DIMembershipBLL shipbll = new CM_DIMembershipBLL((int)ViewState["ShipID"]);
     shipbll.Model.IsApproved = 0;
     shipbll.Update();
     BindData();
     Response.Redirect("DIUserList.aspx");
 }