protected void btnsure_OnDirectClick(object sender, DirectEventArgs e)
 {
     if (!string.IsNullOrEmpty(PasswordField.Text.Trim()))
     {
         string  pwd    = "";
         BG_User bgUser = BG_UserManager.GetBG_UserByUserID(UserID);
         pwd = bgUser.UserPwd;
         if (bgUser.UserPwd == PasswordField.Text.Trim())
         {
             X.Msg.Alert("系统提示", "密码不能与原密码相同").Show();
             return;
         }
         bgUser.UserPwd = PasswordField.Text.Trim();
         if (BG_UserManager.ModifyBG_User(bgUser))
         {
             X.Msg.Alert("系统提示", "密码修改成功").Show();
             Window1.Close();
         }
         BG_ChangePwd bgChangePwd = new BG_ChangePwd();
         bgChangePwd.UserName = UserName;
         bgChangePwd.CrTime   = DateTime.Now;
         bgChangePwd.DepName  = DepName;
         bgChangePwd.NewPwd   = bgUser.UserPwd;
         bgChangePwd.UserID   = bgUser.UserID;
         bgChangePwd.OldPwd   = pwd;
         BG_ChangePwdManager.AddBG_ChangePwd(bgChangePwd);
     }
 }
Пример #2
0
    protected void btninit_OnDirectClick(object sender, DirectEventArgs e)
    {
        int     uid    = common.IntSafeConvert(UserID);
        BG_User bgUser = BG_UserManager.GetBG_UserByUserID(uid);

        bgUser.UserPwd = "12345";
        if (BG_UserManager.ModifyBG_User(bgUser))
        {
            X.Msg.Alert("系统提示", "用户密码已初始化").Show();
        }
    }
Пример #3
0
 public void DodelYes()
 {
     if (!string.IsNullOrEmpty(UserID.Text))
     {
         int uid   = StrToInt(UserID.Text);
         int depid = common.IntSafeConvert(BG_UserManager.GetBG_UserByUserID(uid).DepID);
         if (BG_UserManager.DeleteBG_UserByID(uid))
         {
             Response.Redirect("STMember.aspx?depid=" + depid, true);
         }
     }
 }
Пример #4
0
    private void mod(int uid)
    {
        BG_User user = BG_UserManager.GetBG_UserByUserID(uid);

        user.UserName  = TextField1.Text.Replace(",", string.Empty).Replace(",", string.Empty);
        user.UserNum   = TextField3.Text.Replace(",", string.Empty).Replace(",", string.Empty);
        user.UserIDNum = TextField4.Text.Replace(",", string.Empty).Replace(",", string.Empty);
        user.UserRem   = txtRem.Text.Replace(",", string.Empty).Replace(",", string.Empty);
        string limit    = string.Empty;
        int    isvip    = 0;
        string applyrem = "";

        if (Radio1.Checked == true)
        {
            limit = "100000";
            user.UserDescription = "管理员";
        }

        if (Radio2.Checked == true)
        {
            limit = "010000";
            user.UserDescription = "局领导";
        }
        if (Radio3.Checked == true)
        {
            limit = "001000";
            user.UserDescription = "审核员";
        }
        if (Radio4.Checked == true)
        {
            limit = "000100";
            user.UserDescription = "录入人员";
        }
        if (Radio5.Checked == true)
        {
            limit = "000010";
            user.UserDescription = "查询人员";
        }
        if (Radio6.Checked == true)
        {
            limit = "000001";
            user.UserDescription = "出纳员";
        }

        if (Radio7.Checked == true)
        {
            isvip = 1;
        }
        if (Radio8.Checked == true)
        {
            isvip = 0;
        }
        //if (Radio9.Checked == true)
        //{
        //    applyrem = "000";
        //}
        string applyrem1 = "";
        string applyrem2 = "";
        string applyrem3 = "";

        applyrem1    = Radio9.Checked == true ? "1" : "0";
        applyrem2    = Radio10.Checked == true ? "1" : "0";
        applyrem3    = Radio11.Checked == true ? "1" : "0";
        applyrem     = applyrem1 + applyrem2 + applyrem3;
        user.UserLim = limit;
        string    depname = ComboBox1.Text; //ComboBox1.RawValue.ToString();
        DataTable dt      = BG_DepartmentLogic.GetDepidByName(depname);

        if (dt.Rows.Count > 0)
        {
            user.DepID = StrToInt(dt.Rows[0]["DepID"].ToString());
        }
        user.IsVIP    = isvip;
        user.ApplyRem = applyrem;
        // faUser.UserPurStr = "000000";
        if (BG_UserManager.ModifyBG_User(user))
        {
            X.Msg.Show(new MessageBoxConfig
            {
                Title   = "提示",
                Message = "修改成功",
                Width   = 300,
                Buttons = Ext.Net.MessageBox.Button.OK,
            });
            int depid = common.IntSafeConvert(user.DepID);
            Response.Redirect("STMember.aspx?depid=" + depid, true);
            //Response.Redirect("STMember.aspx", true);
        }
    }
Пример #5
0
    public void Memberselect(string uid)
    {
        uid = uid.Contains("用户")?uid.Replace("用户", ""):uid;
        //FieldSet2.Hidden = !Radio4.Checked;
        TextField1.ReadOnly   = true;
        Session["TextField1"] = 0;
        if (uid.Length <= 0)
        {
            return;
        }
        hidUserID.Value = uid;
        chkClear();
        int     id   = StrToInt(uid);
        BG_User user = BG_UserManager.GetBG_UserByUserID(id);

        //BG_User user = BG_UserManager.GetBG_UserByUsid(id);
        if (user != null)
        {
            TextField1.Text = user.UserName;
            int depid = user.DepID;
            TextField3.Text = user.UserNum;
            TextField4.Text = user.UserIDNum;
            txtRem.Text     = user.UserRem;
            UserID.Text     = user.UserID.ToString();
            string limit = user.UserLim;
            if (common.IntSafeConvert(user.IsVIP.ToString().Substring(0, 1)) == 1)
            {
                Radio7.Checked = true;
            }
            else if (common.IntSafeConvert(user.IsVIP.ToString().Substring(0, 1)) == 0)
            {
                Radio8.Checked = true;
            }
            //else
            //{
            //    Radio19.Checked = true;
            //}
            if (user.ApplyRem.Length > 0 && user.ApplyRem.Substring(0, 1) == "1")
            {
                Radio9.Checked = true;
            }
            else
            {
                Radio9.Checked = false;
            }
            if (user.ApplyRem.Length > 0 && user.ApplyRem.Substring(1, 1) == "1")
            {
                Radio10.Checked = true;
            }
            else
            {
                Radio10.Checked = false;
            }
            if (user.ApplyRem.Length > 0 && user.ApplyRem.Substring(2, 1) == "1")
            {
                Radio11.Checked = true;
            }
            else
            {
                Radio11.Checked = false;
            }
            if (limit.Length >= 5)
            {
                if (limit.Substring(0, 1) == "1")
                {
                    Radio1.Checked = true;
                }
                if (limit.Substring(1, 1) == "1")
                {
                    Radio2.Checked = true;
                }
                if (limit.Substring(2, 1) == "1")
                {
                    Radio3.Checked = true;
                }
                if (limit.Substring(3, 1) == "1")
                {
                    Radio4.Checked = true;
                }
                if (limit.Substring(4, 1) == "1")
                {
                    Radio5.Checked = true;
                }
                if (limit.Substring(5, 1) == "1")
                {
                    Radio6.Checked = true;
                }
            }

            BG_Department dp = BG_DepartmentManager.GetBG_DepartmentByDepID(depid);
            if (dp != null)
            {
                //ComboBox1.RawValue = dp.DepName;
                ComboBox1.Text = dp.DepName;
                if (dp.DepName.Contains("局长基金"))
                {
                    Radio11.Enable(true);
                }
                else
                {
                    Radio11.Disable(true);
                }
            }
        }
    }