Ejemplo n.º 1
0
        private void btnStartBatch_Click(object sender, EventArgs e)
        {
            if (cmbSupervisedBy.SelectedValue != null)
            {
                index = cmbPRPDBatchID.SelectedIndex;

                try
                {
                    objPRPDBatch.Status = PRPDBatch.PRPDBatchStatus.Started;
                    objPRPDBatch.PRPDBatchSuperviser = objEmployee_DL.Get(cmbSupervisedBy.SelectedValue.ToString());
                    objPRPDBatch.PRPDBatchStartDate  = DateTime.Today;
                    objPRPDBatch.PRPDBatchStartedBy  = objEmployee_DL.Get(CurrentUser.EmployeeID);

                    objPRPDBatch_DL.UpdateStartingDetails(objPRPDBatch);

                    Load_Batches(objDepartment);

                    cmbPRPDBatchID.SelectedIndex = index;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message.ToString());
                }
            }
            else
            {
                MessageBox.Show(this, "Please Select a Supervisor Before Start the Batch", "Fill Data", MessageBoxButtons.OK);
            }
        }