Ejemplo n.º 1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            var cIn  = Convert.ToDateTime(clockInDateTimePicker.Value.ToShortDateString() + " " + clockInTimePicker.Value.ToShortTimeString());
            var cOut = Convert.ToDateTime(clockoOutDateTimePicker.Value.ToShortDateString() + " " + clockOutTimePicker.Value.ToShortTimeString());

            if (string.IsNullOrEmpty(modifiedByTextBox.Text) | reasonNewEntryComboBox.SelectedIndex == -1)
            {
                MdlControllerModifier.warning("Edit entry", editEntryTitleLabel);
            }
            else if (reasonNewEntryComboBox.SelectedItem.Equals("Other") & string.IsNullOrEmpty(RichTextBox1.Text))
            {
                MdlControllerModifier.warning("Edit entry", editEntryTitleLabel);
            }
            else if (clockOutCheckBox.Checked & cIn > cOut)
            {
                MdlControllerModifier.warning("Wrong time", editEntryTitleLabel);
            }
            else
            {
                int selectedItemD = My.MyProject.Forms.FrmTimeSheet.detailsBunifuDataGridView.CurrentCell.RowIndex;
                int selectedItemS = My.MyProject.Forms.FrmTimeSheet.summaryBunifuDataGridView.CurrentCell.RowIndex;
                if (shiftTypeComboBox.SelectedItem.Equals("Hourly") & My.MyProject.Forms.FrmTimeSheet.summaryBunifuDataGridView.Rows[selectedItemS].Cells[7].Value.Equals("Crew") & workDoneListView.CheckedIndices.Count == 0 & clockOutCheckBox.Checked)
                {
                    MdlControllerModifier.warning("Edit entry", editEntryTitleLabel);
                }
                else
                {
                    MdlTimeManagement.updatePunchInfo();
                    int userId = Conversions.ToInteger(My.MyProject.Forms.FrmTimeSheet.summaryBunifuDataGridView.Rows[selectedItemS].Cells[7].Value.Equals("Crew"));
                    MdlTimeManagement.populateDetails(Conversions.ToInteger(My.MyProject.Forms.FrmTimeSheet.summaryBunifuDataGridView.Rows[selectedItemS].Cells[6].Value));
                    MdlControllerModifier.clearFields();
                    Close();
                }
            }
        }
Ejemplo n.º 2
0
 private void EmployeeManagementForm_Load(object sender, EventArgs e)
 {
     MdlOptionsManagement.getEmployeeManagementAllowedFunctionalities();
     MdlControllerModifier.clearFields();
     MdlEmpManagement.populateEmployeeList(BunifuDataGridView1, employeeStatus);
     firstLoad = false;
 }
Ejemplo n.º 3
0
        private void EmployeeManagementForm_Load(object sender, EventArgs e)
        {
            pictureExtendsion = "";
            PictureLocalPath  = "";
            MdlOptionsManagement.getEmployeeManagementAllowedFunctionalities();
            // adjustScreen(Me, FrmParentScreen.menuIsExpanded)
            MdlControllerModifier.clearFields();
            var jobDescriptionsTable = db.getTableInfo("Employees", "distinct(Job_Description)", "order by Job_Description").Rows;

            jobDescriptionComboBox.Items.Clear();
            foreach (DataRow job in jobDescriptionsTable)
            {
                jobDescriptionComboBox.Items.Add(job["Job_Description"]);
            }
        }
Ejemplo n.º 4
0
        private void Button4_Click(object sender, EventArgs e)
        {
            if (FinishButton.Text.Equals("Cancel"))
            {
                MdlControllerModifier.clearFields();
                MdlControllerModifier.formatTabsbackToNormal();
            }
            else
            {
                db.updateCardID(_employeeFirstName, _alias, _employeeLasttName, Conversions.ToString(_cardID)); // Then
                _cardID = "";
                MdlControllerModifier.formatTabsbackToNormal();
                MdlControllerModifier.clearFields();
                newEmployeeTabControl.SelectTab(0);
                MdlEmpManagement.populateEmployeeList(My.MyProject.Forms.FrmEmployeeManagement.BunifuDataGridView1, My.MyProject.Forms.FrmEmployeeManagement.employeeStatus);
            }

            Close();
            My.MyProject.Forms.FrmEmployeeManagement.Show();
        }
Ejemplo n.º 5
0
        private void Button1_Click(object sender, EventArgs e)
        {
            bool completeTimeSheet = true;

            if (summaryBunifuDataGridView.SelectedRows.Count > 0)
            {
                if (completeTimeSheet == true)
                {
                    MdlControllerModifier.clearFields();
                    MdlTimeManagement.exportCSV();
                }
                else
                {
                    MdlControllerModifier.warning("timesheet not complete", titleTimeManagementLabel);
                }
            }
            else
            {
                MdlControllerModifier.warning("nothing selected", titleTimeManagementLabel);
            }
        }
Ejemplo n.º 6
0
 private void Button2_Click(object sender, EventArgs e)
 {
     Close();
     MdlModifyData.clearEmployeeDetails();
     MdlControllerModifier.clearFields();
 }