private void btnPrintMaterial_Click(object sender, EventArgs e) { objSection = objSection_DL.Get(Convert.ToInt64(cmbSections.SelectedValue)); frmWIP_Packing_MaterialTablePrint frm = new frmWIP_Packing_MaterialTablePrint(Convert.ToInt32(cmbSections.SelectedValue), objSection.SectionHead.EmployeeName, cmbSections.Text); frm.Show(); }
private void btnPrint_Click(object sender, EventArgs e) { objSection = objSection_DL.Get(Convert.ToInt64(cmbSections.SelectedValue)); frmWIP_manufacturingReport frm = new frmWIP_manufacturingReport((int)Batch.Status.Packing, Convert.ToInt32(cmbSections.SelectedValue), cmbSections.Text, objSection.SectionHead.EmployeeName); frm.Show(); }
private void gvEmployee_CellClick(object sender, DataGridViewCellEventArgs e) { try { if (e.RowIndex >= 0) { objEmp = objEmpDL.Get(gvEmployee.Rows[e.RowIndex].Cells["ColEmpID"].Value.ToString()); txtEmployeeID.Text = objEmp.EmployeeID; txtName.Text = objEmp.EmployeeName; cmbEmployeeRole.SelectedValue = objEmp.EmployeeRole.EmpRoleID; cbStatus.Checked = objEmp.EmpStatus; cmbEmpTYpe.SelectedItem = objEmp.EmpType; txtRate.Text = objEmp.RatePerHour.ToString(); txtOTRate.Text = objEmp.OTRatePerHour.ToString(); ucSectionFilter1.Section = objSectionDL.Get(objEmp.Section.Value); this.EmployeeSelect = true; this.OriginalEmpID = objEmp.EmployeeID; } } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void cmbSection_SelectedIndexChanged(object sender, EventArgs e) { try { if (cmbSection.SelectedValue != null) { objSections = objSection_DL.Get(Convert.ToInt64(cmbSection.SelectedValue)); } } catch (Exception) { MessageBox.Show(this, "Error occured while loading Labour Details", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void cmbSections_SelectedIndexChanged(object sender, EventArgs e) { try { objSection = objSection_DL.Get(Convert.ToInt32(cmbSections.SelectedValue)); Load_employee(); Load_Labour_List(); } catch (Exception) { MessageBox.Show(this, "Error occured while loading Labour Details", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void gvActivityList_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { try { objMainActivity = objManiActDL.Get(Convert.ToInt64(gvActivityList.Rows[e.RowIndex].Cells["colActID"].Value)); if (objMainActivity != null) { txtActivity.Text = objMainActivity.MainActivityTitle; ucSectionFilter1.Set(objSection_DL.Get(objMainActivity.SectionID)); bindMachineList.DataSource = objMachineActivity_DL.GetDataByAct(objMainActivity.MainActID); cmbTemplate.SelectedItem = objMainActivity.Type; grpMachine.Enabled = true; } } catch (Exception) { MessageBox.Show(this, "Error occured while loading Main Activity", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }
private void gvSections_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { try { long ID = Convert.ToInt64(gvSections.Rows[e.RowIndex].Cells["colSectionID"].Value); Sections obj = objSectionDL.Get(ID); if (obj != null) { txtID.Text = obj.SectionID.ToString(); txtName.Text = obj.SectionName; cmbSupervisor.SelectedValue = obj.SectionHead.EmployeeID; IsSelect = true; } } catch (Exception) { MessageBox.Show(this, "Error occured while loading", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }
private void gvDepartment_CellClick(object sender, DataGridViewCellEventArgs e) { try { Department_DL objDepDL = new Department_DL(ConnectionStringClass.GetConnection()); Section_DL objSection_DL = new Section_DL(ConnectionStringClass.GetConnection()); OverheadRates objOverheadRates = new OverheadRates(); OverheadRates_DL objOverheadRates_DL = new OverheadRates_DL(ConnectionStringClass.GetConnection()); Employee_DL objEmpDL = new Employee_DL(ConnectionStringClass.GetConnection()); ClearDep(); if (true) { Sections objSection = objSection_DL.Get(Convert.ToInt64(gvDepartment.Rows[e.RowIndex].Cells["colDepID"].Value)); Department objDep = objDepDL.Get(objSection.DepID); if (objDep.DepID != 0) { txtSection.Text = objSection.SectionName; objSelectedSections = objSection; txtDID.Text = objDep.DepID.ToString(); txtDepartmentName.Text = objDep.DepName; objOverheadRates = objOverheadRates_DL.Get(objSection.SectionID); if (objOverheadRates.SectionID != 0) { txtDepCurrent.Text = objOverheadRates.Rate.ToString(); Employee objEmp = objEmpDL.Get(objOverheadRates.EnterdBy); txtDepEnterdBy.Text = objEmp.EmployeeName; txtDepEnterdDate.Text = objOverheadRates.EnterdDate.ToShortDateString(); } } } } catch (Exception) { MessageBox.Show(this, "Error occured", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }