Example #1
0
        private void initForm(UserShopRoleInfo info)
        {
            if (info != null)
            {
                UserInfo tmpUser = new UserInfo();
                DBModelBase.Clone<UserInfo>(info.User, ref tmpUser);
                newUserShopRoleInfo.User = tmpUser;

                userShopRoleInfo = info;
            }
            cbRole.Properties.Items.AddRange(GlobalCaches.Instance.RoleInfos);
            cbShop.Properties.Items.AddRange(GlobalCaches.Instance.ShopInfos);

            this.Text += IsNew ? "-新增" : "-修改";
            this.Btn_OK.Click += Btn_OK_Click;

            if (IsNew)
                newUserShopRoleInfo.User = new UserInfo() { ShopId = GlobalCaches.Instance.CurUser.ShopId };
            cbShop.DataBindings.Add("EditValue", newUserShopRoleInfo, "Shop");
            cbRole.DataBindings.Add("EditValue", newUserShopRoleInfo, "Role");

            var userInfo = newUserShopRoleInfo.User;
            rdSex.SelectedIndex = userInfo.Sex.HasValue ? userInfo.Sex.Value - 1 : -1;
            txtRealName.DataBindings.Add("Text", userInfo, "RealName");
            txtPhone.DataBindings.Add("Text", userInfo, "Phone");
            txtUserName.DataBindings.Add("Text", userInfo, "UserName");
            txtPwd.DataBindings.Add("Text", userInfo, "Pwd");

            // 权限
            //cbShop.Enabled = cbRole.Enabled = GloablCaches.Instance.CurUser.RoleId == GloablConstants.RoleIdSysAdmin;
        }
Example #2
0
        public FmAnalyseResult(UserInfo info, UserGroupInfo groupInfo)
        {
            InitializeComponent();
            consultantInfo = info;
            consultGroupInfo = groupInfo;

            this.Btn_OK.Click += Btn_OK_Click;
        }
Example #3
0
 public FmAnalyseResult(UserInfo info)
 {
     InitializeComponent();
     consultantInfo = info;
 }