private void cmbActivity_SelectedIndexChanged(object sender, EventArgs e) { try { cmbMachine.DataSource = objMachine_DL.GetDataView_By_Activity(Convert.ToInt64(cmbActivity.SelectedValue)); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void frmActivityDetailsMachine_Load(object sender, EventArgs e) { try { if (objRPDBatchActivityDetails != null) { txtID.Text = objRPDBatchActivityDetails.BatchActDetailsID.ToString(); txtComments.Text = objRPDBatchActivityDetails.Comments; bindMachines.DataSource = objRPDActivityDetailsMachineDL.Get_By_BatchActDetails_View(objRPDBatchActivityDetails.BatchActDetailsID); RPDBatchActivity obj = objRPDBatchActivityDL.Get(objRPDBatchActivityDetails.RPDBatchActID); cmbMachine.DataSource = objMachineDL.GetDataView_By_Activity(obj.MainActID); } } catch (Exception ex) { MessageBox.Show(this, "Error occured while loading machine details", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void cmbActivityInstructions_SelectedIndexChanged(object sender, EventArgs e) { try { if (cmbActivityInstructions.SelectedValue != null) { DataTable dt = new DataTable(); dt = objMachineDL.GetDataView_By_Activity(Convert.ToInt64(cmbActivityInstructions.SelectedValue)); bindMachine.DataSource = dt; cmbMachine.DataSource = bindMachine; } } catch (Exception) { MessageBox.Show(this, "Error occured while loading Machines", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void frmPRPDMachine_Load(object sender, EventArgs e) { try { if (objPRPDBatchActivityDetails != null) { MainActivity_DL objMainActivityDL = new MainActivity_DL(ConnectionStringClass.GetConnection()); MainActivity obj = objMainActivityDL.Get(objPRPDBatchActivityDetails.PRPDBatchActivity.MainActID); lblActivity.Text = obj.MainActivityTitle; txtID.Text = objPRPDBatchActivityDetails.PRPDBatchActDetailsID.ToString(); txtComments.Text = objPRPDBatchActivityDetails.Remarks; bindMachines.DataSource = objPRPDActivityDetailsMachineDL.GetDataView(objPRPDBatchActivityDetails.PRPDBatchActDetailsID); cmbMachine.DataSource = objMachineDL.GetDataView_By_Activity(objPRPDBatchActivityDetails.PRPDBatchActivity.MainActID); } } catch (Exception ex) { MessageBox.Show(this, "Error occured while loading machine details", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }