Пример #1
0
        public bool isEditMode; /*{ get; set; }*/

        public CreateUser(ManageEmployeeRecords manageEmployeeListing = null)
        {
            InitializeComponent();
            lblTitle.Text          = "Add New Employee";
            this.Text              = "Add New Employee";
            isEditMode             = false;
            _manageEmployeeListing = manageEmployeeListing;
            _db = new HRMSEntities2();
        }
Пример #2
0
        private void myProfileToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            var OpenForms = Application.OpenForms.Cast <Form>();
            var isOpen    = OpenForms.Any(q => q.Name == "ManageEmployeeListing");

            if (!isOpen)
            {
                var emploeelisting = new ManageEmployeeRecords();
                emploeelisting.ShowDialog();
                emploeelisting.MdiParent = this;
            }
        }
Пример #3
0
 public CreateUser(Employee staffToEdit, ManageEmployeeRecords manageEmployeeListing = null)
 {
     InitializeComponent();
     lblTitle.Text          = "Edit Employee";
     this.Text              = "Edit Employee";
     _db                    = new HRMSEntities2();
     _manageEmployeeListing = manageEmployeeListing;
     if (staffToEdit == null)
     {
         MessageBox.Show("Please ensure that you selected a valid record to edit");
         Close();
     }
     else
     {
         isEditMode = true;
         _db        = new HRMSEntities2();
         PopulateFields(staffToEdit);
     }
 }