private void Set_Form_For_Read() { if (this.Text.IndexOf("- New") > -1) { this.Text = this.Text.Substring(0, this.Text.IndexOf("- New") - 1); } else { if (this.Text.IndexOf("- Update") > -1) { this.Text = this.Text.Substring(0, this.Text.IndexOf("- Update") - 1); } } this.dgvNormalSickLeaveCategoryDataGridView.Enabled = true; this.dgvPayrollTypeDataGridView.Enabled = true; this.picLeaveLock.Visible = false; this.picPayrollTypeLock.Visible = false; clsISUtilities.Set_Form_For_Read(); this.btnNew.Enabled = true; this.btnUpdate.Enabled = true; this.btnDelete.Enabled = false; this.btnSave.Enabled = false; this.btnCancel.Enabled = false; }
private void Set_Form_For_Read() { this.grbActivationProcess.Visible = false; this.tmrTimer.Enabled = false; this.dgvPayrollTypeDataGridView.Enabled = true; this.picPayrollTypeLock.Visible = false; this.btnNew.Enabled = true; this.btnSave.Enabled = false; this.btnCancel.Enabled = false; this.btnAdd.Enabled = false; this.btnAddAll.Enabled = false; this.btnRemove.Enabled = false; this.btnRemoveAll.Enabled = false; clsISUtilities.Calender_Control_From_TextBox_Disable(this.txtDate); this.cboRunDate.Enabled = false; clsISUtilities.Set_Form_For_Read(); Clear_Form_Fields(); }
private void Set_Form_For_Read() { if (this.Text.IndexOf("- New") > -1) { this.Text = this.Text.Substring(0, this.Text.IndexOf("- New") - 1); } else { if (this.Text.IndexOf("- Update") > -1) { this.Text = this.Text.Substring(0, this.Text.IndexOf("- Update") - 1); } } clsISUtilities.Set_Form_For_Read(); if (AppDomain.CurrentDomain.GetData("AccessInd").ToString() == "S") { this.btnNew.Enabled = true; } this.btnUpdate.Enabled = false; this.btnDelete.Enabled = false; this.btnSave.Enabled = false; this.btnCancel.Enabled = false; this.rbnEditNo.Enabled = false; this.rbnEditYes.Enabled = false; this.dgvCompanyDataGridView.Enabled = true; this.picCompanyLock.Visible = false; Load_CurrentForm_Records(); }
private void Set_Form_For_Read() { if (this.Text.IndexOf("- New") > -1) { this.Text = this.Text.Substring(0, this.Text.IndexOf("- New") - 1); } else { if (this.Text.IndexOf("- Update") > -1) { this.Text = this.Text.Substring(0, this.Text.IndexOf("- Update") - 1); } } this.dgvPayrollTypeDataGridView.Enabled = true; this.dgvSchiftScheduleDataGridView.Enabled = true; picShiftScheduleLock.Visible = false; this.picPayrollTypeLock.Visible = false; clsISUtilities.Set_Form_For_Read(); this.btnNew.Enabled = true; this.btnSave.Enabled = false; this.btnCancel.Enabled = false; this.txtFromDate.Enabled = false; this.txtToDate.Enabled = false; this.rbnLocked.Enabled = false; this.rbnUnlocked.Enabled = false; if (this.pvtShiftScheduleDataView.Count > 0) { this.btnUpdate.Enabled = true; this.btnDelete.Enabled = true; } else { this.btnUpdate.Enabled = false; this.btnDelete.Enabled = false; this.txtFromDate.Text = ""; this.txtToDate.Text = ""; } Load_CurrentForm_Records(); }
private void Set_Form_For_Read() { if (this.Text.IndexOf("- New") > -1) { this.Text = this.Text.Substring(0, this.Text.IndexOf("- New") - 1); } else { if (this.Text.IndexOf("- Update") > -1) { this.Text = this.Text.Substring(0, this.Text.IndexOf("- Update") - 1); } } this.dgvOccupationDepartmentDataGridView.Enabled = true; picOccupationDepartmentLock.Visible = false; clsISUtilities.Set_Form_For_Read(); this.btnNew.Enabled = true; this.btnSave.Enabled = false; this.btnCancel.Enabled = false; this.txtOccupationDepartment.Enabled = false; if (this.pvtOccupationDepartmentDataView.Count > 0) { this.btnUpdate.Enabled = true; this.btnDelete.Enabled = true; } else { this.btnUpdate.Enabled = false; this.btnDelete.Enabled = false; this.txtOccupationDepartment.Text = ""; } Load_CurrentForm_Records(); }
private void Set_Form_For_Read() { if (this.Text.IndexOf("- New") > -1) { this.Text = this.Text.Substring(0, this.Text.IndexOf("- New") - 1); } else { if (this.Text.IndexOf("- Update") > -1) { this.Text = this.Text.Substring(0, this.Text.IndexOf("- Update") - 1); } } this.dgvDeductionDataGridView.Enabled = true; this.dgvPayrollTypeDataGridView.Enabled = true; this.picDeductionLock.Visible = false; this.picPayrollTypeLock.Visible = false; this.btnNew.Enabled = true; //this.btnUpdate.Enabled = false; this.btnDelete.Enabled = true; this.btnSave.Enabled = false; this.btnCancel.Enabled = false; clsISUtilities.Set_Form_For_Read(); this.dgvEarningDataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect; this.dgvEarningDataGridView.EditMode = DataGridViewEditMode.EditProgrammatically; if (this.dgvDeductionDataGridView.Rows.Count > 0) { this.Set_DataGridView_SelectedRowIndex(this.dgvDeductionDataGridView, this.Get_DataGridView_SelectedRowIndex(this.dgvDeductionDataGridView)); } }
private void btnCancel_Click(object sender, EventArgs e) { this.Text = this.Text.Substring(0, this.Text.IndexOf("- Update") - 1); grbActivationProcess.Visible = false; this.btnUpdate.Enabled = true; this.btnCancel.Enabled = false; this.btnSave.Enabled = false; clsISUtilities.Set_Form_For_Read(); this.picPayrollTypeLock.Visible = false; this.dgvPayrollTypeDataGridView.Enabled = true; this.Clear_DataGridView(this.dgvEmployeeDataGridView); this.Clear_DataGridView(this.dgvChosenEmployeeDataGridView); this.btnAdd.Enabled = false; this.btnAddAll.Enabled = false; this.btnRemove.Enabled = false; this.btnRemoveAll.Enabled = false; }