Exemplo n.º 1
0
        /// <summary>
        /// 编辑按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnUsereditor_Click(object sender, EventArgs e)
        {
            if (!userLoginInfo.IsSuperAdmin)
            {
                UserEdit userEdit = new UserEdit();
                userEdit.StartPosition          = FormStartPosition.CenterScreen;
                userEdit.PassUserInfoEditEvent += UserInfoDisplay_Event;
                userEdit.ShowDialog();
            }
            else
            {
                int selectedHandle;
                if (this.gridView1.SelectedRowsCount > 0)
                {
                    if (userCeation == null)
                    {
                        userCeation = new UserCeation();
                        userCeation.DataHandleEvent += userCeation_DataHandleEvent;
                        userCeation.StartPosition    = FormStartPosition.CenterScreen;
                    }
                    selectedHandle = this.gridView1.GetSelectedRows()[0];
                    ID             = this.gridView1.GetRowCellValue(selectedHandle, "用户账户").ToString();
                    userManagementDic.Clear();
                    userManagementDic.Add("QueryUserCeation", new object[] { ID });
                    UserManagementSend(userManagementDic);

                    userCeation.Text = "用户编辑";
                    userCeation.lblNotesLoad2();
                    userCeation.UserCeation_Load(null, null);
                    userCeation.ShowDialog();
                }
            }
        }
Exemplo n.º 2
0
        private void btnUsercreation_Click(object sender, EventArgs e)
        {
            if (!userLoginInfo.IsSuperAdmin)
            {
                UserCommon userCommon = new UserCommon();
                userCommon.StartPosition      = FormStartPosition.CenterScreen;
                userCommon.PassUserInfoEvent += UserInfoDisplay_Event;

                userCommon.ClearCache();
                userCommon.userInfoList = lstuserInfo;
                userCommon.ShowDialog();
            }
            else
            {
                if (userCeation == null)
                {
                    userCeation = new UserCeation();
                    userCeation.DataHandleEvent += userCeation_DataHandleEvent;
                    userCeation.StartPosition    = FormStartPosition.CenterScreen;
                }
                userCeation.Text = "用户创建";
                userCeation.lblNotesLoad1();
                userCeation.UserCeation_Load(null, null);
                userCeation.ShowDialog();
            }
        }