예제 #1
0
 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());
     }
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
        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);
            }
        }
예제 #4
0
        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);
            }
        }