Beispiel #1
0
 private void ListUsersDgView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditUsers) == EventStatus.Permit)
         {
             Users aUserDataRow = new Users();
             aUserDataRow.User_Name        = ListUsersDgView.Rows[e.RowIndex].Cells["Namecol"].Value.ToString();
             aUserDataRow.User_Address     = ListUsersDgView.Rows[e.RowIndex].Cells["Address"].Value.ToString();
             aUserDataRow.User_Phone1      = ListUsersDgView.Rows[e.RowIndex].Cells["Phone1"].Value.ToString();
             aUserDataRow.User_Phone2      = ListUsersDgView.Rows[e.RowIndex].Cells["Phone2"].Value.ToString();
             aUserDataRow.User_UserName    = ListUsersDgView.Rows[e.RowIndex].Cells["UserName"].Value.ToString();
             aUserDataRow.User_Password    = ListUsersDgView.Rows[e.RowIndex].Cells["Password"].Value.ToString();
             aUserDataRow.User_Description = ListUsersDgView.Rows[e.RowIndex].Cells["Description"].Value.ToString();
             EditUser aEditUser = new EditUser();
             aEditUser.ControlBox      = true;
             aEditUser.MaximizeBox     = true;
             aEditUser.FormBorderStyle = FormBorderStyle.Fixed3D;
             aEditUser.Show();
             aEditUser.UpdateVariables(ListUsersDgView.Rows[e.RowIndex].Cells["UserName"].Value.ToString());
         }
         else
         {
             MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(MsgTxt.UnexpectedError + "\n IN [ListUsers:ListUsersDgView_CellDoubleClick()] \n Exception: \n" + ex.ToString(), MsgTxt.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
         throw;
     }
 }
Beispiel #2
0
 private void EditUsersRibnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditUsers) == EventStatus.Permit)
     {
         EditUser aEditUser = new EditUser();
         __AddTabPage(aEditUser, __ToolsColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #3
0
        private void editUsersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditUsers) == EventStatus.Permit)
            {
                EditUser aEditUser = new EditUser();
                aEditUser.Visible = false;
                //aEditUser.MdiParent = Helper.Instance.ActiveMainWindow;
                aEditUser.Activate();
                aEditUser.Visible = true;
//                aEditUser.Show();
            }
            else
            {
                MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }