Exemplo n.º 1
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);
                }
            }
        }
    }
Exemplo n.º 2
0
    public void selectdep(string depname)
    {
        List <string> listdep = (List <string>)Session["sedep"];

        if (depname == "部门管理")
        {
            return;
        }
        //int depid = common.IntSafeConvert(BG_DepartmentLogic.GetBG_DepartmentByName(depname).DepID);
        if (listdep.Contains(depname))
        {
            //if (depid<=0)
            //{
            //    return;
            //}
            if (TextField1.Text != string.Empty)
            {
                if ((int)Session["TextField1"] != 0)
                {
                    string st = string.Format("CompanyX.DoSelectDepYes('{0}')", depname);
                    X.Msg.Confirm("提示", "您未添加该数据,确认选择其他部门会丢失该数据,是否仍选择其他部门?", new MessageBoxButtonsConfig
                    {
                        Yes = new MessageBoxButtonConfig
                        {
                            Handler = st,
                            Text    = "是"
                        },
                        No = new MessageBoxButtonConfig
                        {
                            Text = "否"
                        }
                    }).Show();
                }
                else
                {
                    ComboBox1.Text      = depname;
                    Session["depname"]  = depname;
                    UserID.Text         = "";
                    TextField1.Text     = "";
                    TextField3.Text     = "";
                    TextField4.Text     = "";
                    TextField1.ReadOnly = false;
                    txtRem.Text         = "";
                    Radio1.Checked      = true;
                }
            }
            else
            {
                //ComboBox1.RawValue = depname;
                ComboBox1.Text      = depname;
                Session["depname"]  = depname;
                UserID.Text         = "";
                TextField1.Text     = "";
                TextField3.Text     = "";
                TextField4.Text     = "";
                TextField1.ReadOnly = false;
                txtRem.Text         = "";
                Radio1.Checked      = true;
            }
            if (depname == "局长基金")
            {
                Radio11.Enable(true);
            }
            else
            {
                Radio11.Disable(true);
            }
        }
    }