private void frmPRPDBatchCreateCAP_Load(object sender, EventArgs e) { try { dtMaterials = objMaterial_DL.GetDataView(Convert.ToInt32(SESD.MRP.REF.Material.Status.Enable)); dtEmployees = objEmployee_DL.Get_By_RoleType("Manager", "Staff", "Production", true); dtActivityMachine = objMachineActivity_DL.GetDataByAct(Convert.ToInt64(cmbActivityID.SelectedValue)); cmbInstructedBy.DataSource = dtEmployees; //Load Activity Department objDep = objDepDL.GetByDepType("PRPD"); cmbActivityID.DataSource = objMainActivity_DL.GetByDepID(objDepDL.GetByDepType("PRPD").DepID); cmbActivityID.DisplayMember = "MainActivity"; cmbActivityID.ValueMember = "MainActID"; //Load CAPRework dtMTN = objMTN_DL.GetDataViewByStateAndType(MTN.Status.Received, MTN.Type.PRPDCAPBatch); objSourceMTN.DataSource = dtMTN; cmbMTN.DataSource = objSourceMTN; } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void frmPrimaryPreperationBatchCreateIndependent_Load(object sender, EventArgs e) { //cmbStores.DataSource = objStoreDL.Get(objDepDL.GetByDepType("Store").DepID); objStore = objStoreDL.Get_Default(objDepDL.GetByDepType("Store").DepID); try { txtStore.Text = objStore.StoreName; dtMaterials = objMaterial_DL.GetDataView("Raw"); dtEmployees = objEmployee_DL.Get_By_RoleType("Staff", true); dtActivityMachine = objMachineActivity_DL.GetDataByAct(Convert.ToInt64(cmbActivityID.SelectedValue)); objSourceMaterial.DataSource = dtMaterials; cmbMaterial.DataSource = objSourceMaterial; Department objDep = objDepDL.GetByDepType("PRPD"); cmbActivityID.DataSource = objMainActivity_DL.GetByDepID(objDepDL.GetByDepType("PRPD").DepID); cmbActivityID.DisplayMember = "MainActivity"; cmbActivityID.ValueMember = "MainActID"; txtInstructedBy.Text = CurrentUser.UserEmp.EmployeeNameID; } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void frmBatchPlan_Load(object sender, EventArgs e) { try { cmbMonth.DataSource = Enum.GetValues(typeof(DepartmentPlans.Months)); cmbMonth.SelectedItem = Enum.GetName(typeof(DepartmentPlans.Months), DateTime.Today.Month); cmbYear.Text = DateTime.Today.Year.ToString(); dtCategoryList = objBasicProducts_DL.GetCategoryList(); objRPD = objDepartment_DL.GetByDepType("RPD"); objPRPD = objDepartment_DL.GetByDepType("PRPD"); if (dtCategoryList.Rows.Count != 0) { objSourceCategoryList.DataSource = dtCategoryList; cmbCategoryList.DataSource = objSourceCategoryList; } rdbWeek01_CheckedChanged(sender, e); cmbCategoryList_SelectedIndexChanged(sender, e); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void frmRPDBatchInitialize_Load(object sender, EventArgs e) { try { Department objDep = objDepartmentDL.GetByDepType("RPD"); Department objStoreDep = objDepartmentDL.GetByDepType("Store"); cmbActivityInstructions.DataSource = objMainActivityDL.GetByDepID(objDep.DepID); txtQtyBasic.Text = objRPDBatch.RPDBatchQty.ToString(); lblID.Text = objRPDBatch.RPDBatchID; txtMateral.Text = objRPDBatch.RPDBatchMaterial.MaterialCode + " - " + objRPDBatch.RPDBatchMaterial.MaterialDescription; if (objRPDBatch.RPDBatchID != null) { dgvActivityInstructions.AutoGenerateColumns = false; bindInstructions.DataSource = objRPDBatchActivityInstructionsDL.GetDataView(objRPDBatch.RPDBatchID); dgvActivityInstructions.DataSource = bindInstructions; bindInstructions.ResetBindings(true); gvProduction.AutoGenerateColumns = false; bindProduction.DataSource = objRPDBatchProductionDL.GetDataByBatchID(objRPDBatch.RPDBatchID); gvProduction.DataSource = bindProduction; bindProduction.ResetBindings(true); } bindMaterial_Inter.DataSource = objMaterialDL.GetDataViewIntermediates(objRPDBatch.RPDBatchMaterial.MaterialCode); cmbMaterialInter.DataSource = bindMaterial_Inter; } catch (Exception) { MessageBox.Show(this, "Error occcured while loading", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void frmMRT_Load(object sender, EventArgs e) { try { Material objMat = new Material(); DataTable dt = new DataTable(); objDepartment = objDepDL.GetByDepType("RPD"); bindItemList.DataSource = null; objMRMaterialCollec.Clear(); cmbStore.DataSource = objStoreDL.Get(); cmbBatchID.DataSource = objRPDBatch_DL.GetDataViewByState(RPDBatch.RPDBatchStatus.Approved, RPDBatch.RPDBatchStatus.Started, true); dt = objMaterialDL.GetDataView(MaterialCat); objSourceMaterial.DataSource = dt; cmbItem.DataSource = objSourceMaterial; objMat = objMaterialDL.Get(cmbItem.SelectedValue.ToString()); if (objMat != null) { lblUnit.Text = objMat.MatUnit.UnitCode; } } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void frmPRPDCAP_ReworkBatchManagement_Load(object sender, EventArgs e) { try { objStore = objStore_DL.Get_Default(objDepartment_DL.GetByDepType("Store").DepID); txtStore.Text = objStore.StoreName; cmbPRPDBatchStatus.DataSource = Enum.GetNames(typeof(PRPDBatch.PRPDBatchStatus)); cmbStores.DataSource = objStore_DL.Get(objDepartment_DL.GetByDepType("Store").DepID); dtStaff = objEmployee_DL.Get_By_RoleType("Staff", true); objSourceStaff.DataSource = dtStaff; //cmbSupervisedBy.DataSource = objSourceStaff; } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void frmAddPRPDActivity_Load(object sender, EventArgs e) { try { cmbActivity.DataSource = objMainActivityDL.GetByDepID(objDepartment_DL.GetByDepType("PRPD").DepID); //cmbSupervisedBy.DataSource = objEmployeeDL.Get_By_RoleType( EmployeeRole.RoleType.Staff.ToString(), true); } catch (Exception) { MessageBox.Show(this, "Error occured while loading New RPD Batch Activity", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void btnTransferBP_Click(object sender, EventArgs e) { try { DialogResult theResult = MessageBox.Show(this, "Do You Need to Transfer Basic Product to RPD Stores", "Confirmation", MessageBoxButtons.YesNo); if (theResult == System.Windows.Forms.DialogResult.Yes) { DataTable dtReports = objQCReport_DL.Get_IsManufacturingQCPass(objBatch.BatchID, Convert.ToInt32(QCReport.ReportStatus.Accept)); if (dtReports.Rows.Count > 0) { MTN objMTN = new MTN(); objMTN.MTNBatch = Convert.ToString(dgvBatcList.CurrentRow.Cells["BatchNo"].Value); objMTN.MTNEnterdBy = objEmployee_DL.Get(CurrentUser.EmployeeID); objMTN.MTNDepartmentTo = objDepartment_DL.GetByDepType("RPD"); objMTN.MTNStatus = MTN.Status.Initial; objMTN.MTNType = MTN.Type.Batch; objMTN.MTNItemType = MTN.ItemType.Basic_Product; //int i = objMTN_DL.CreateBasicProductTransfer_toRPD(objMTN, BatchActivity.Status.Transferred, objBatch.StandardBatch.STDBatchBasicProduct.BasicProductCode, Convert.ToDecimal(txtBasicQty.Text)); //if (i > 0) //{ // MessageBox.Show(this, "Successfully sent to Stores. MTN No is :" + i.ToString(), "Successful", MessageBoxButtons.OK); //} //Load_Activity(); //if (dgvBatcList.Rows.Count > 0) //{ // DataGridViewCellEventArgs dr = new DataGridViewCellEventArgs(1, 0); // dgvBatcList_CellClick(sender, dr); // dgvActivity_CellClick(sender, dr); //} } else { MessageBox.Show(this, "Packing QC is Not Passed", "Can not Proceed", MessageBoxButtons.OK); } } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void frmRPDBatchManage_Load(object sender, EventArgs e) { try { Department objStoreDep = objDepartmentDL.GetByDepType("Store"); cmbStores.DataSource = objStoreDL.Get(objStoreDep.DepID); cmbStores.SelectedValue = "RM_Processed"; cmbStatus.DataSource = Enum.GetValues(typeof(RPDBatch.RPDBatchStatus)); } catch (Exception) { MessageBox.Show(this, "Error occured while loading", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void frmRPDBatchInitialize_Load(object sender, EventArgs e) { try { cmbBatchType.SelectedIndex = 0; Department objDep = objDepartmentDL.GetByDepType("RPD"); Department objStoreDep = objDepartmentDL.GetByDepType("Store"); cmbActivityInstructions.DataSource = objMainActivityDL.GetByDepID(objDep.DepID); cmbMaterialList.DataSource = objMaterialDL.GetDataViewByCategory("Processed", "", "", 1); Load_BatchList(); txtQtyBasic.Text = objRPDBatch.RPDBatchQty.ToString(); lblID.Text = objRPDBatch.RPDBatchID; if (objRPDBatch.RPDBatchID != null) { bindInstructions.DataSource = objRPDBatchActivityInstructionsDL.GetDataView(objRPDBatch.RPDBatchID); bindProduction.DataSource = objRPDBatchProductionDL.GetDataByBatchID(objRPDBatch.RPDBatchID); if (objRPDBatch.RPDBatchMR.MRStatus == MR.Status.Reject) { btnCreate.Enabled = true; } else { btnCreate.Enabled = false; } } } catch (Exception) { MessageBox.Show(this, "Error occcured while loading", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public long GenerateMR(PRPDBatch objPRPD) { MR objMR = new MR(); MRMaterialCollec objMRMatCollec = new MRMaterialCollec(); MRFinishProductCollec objMRFinishProductCollec = new MRFinishProductCollec(); MRBasicProductCollec objMRBasicProductCollec = new MRBasicProductCollec(); BatchMR objBatchMR = new BatchMR(); Department_DL objDepDL = new Department_DL(ConnectionStringClass.GetConnection()); MR_DL objMRDL = new MR_DL(ConnectionStringClass.GetConnection()); MRMaterial_DL objMRMaterialDL = new MRMaterial_DL(ConnectionStringClass.GetConnection()); Store_DL objStoreDL = new Store_DL(ConnectionStringClass.GetConnection()); try { objMR.MRDate = DateTime.Now; objMR.MRDepartmentFrom = objDepDL.GetByDepType("PRPD"); objMR.MREnterdBy = CurrentUser.EmployeeID; objMR.MRStatus = MR.Status.Initial; objMR.MRStore = objStore; objMR.MRType = MR.Type.Material; objMR.MRRemarks = "Material Requition(Materials) for PRPD Batch NO " + objPRPD.PRPDBatchID.ToString(); objMR.OriginType = MR.Origin.ToBatch; MRMaterial obj = new MRMaterial(); obj.Description = "PRPD Batch Material Requition"; obj.Material = objPRPD.PRPDBatchMaterial; obj.MRBINNo = ""; obj.ReqdQty = objPRPD.PRPDBatchQty; long MRNO = objMRDL.Add_M(objMR); if (MRNO > 0) { objMR.MRNO = MRNO; obj.MR = objMR; objMRMaterialDL.Add(obj); } return(MRNO); } catch (Exception ex) { return(0); } }
private void frmGRNMATDirect_Load(object sender, EventArgs e) { try { objDepartment = objDepartmentDL.GetByDepType("STORE"); LoadDirect(); objStore = objStoreDL.Get(StoreID); txtDepartment.Text = objDepartment.DepName; txtStores.Text = objStore.StoreName; } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void frmPrimaryPreparationBatch_Load(object sender, EventArgs e) { try { objDepartment = objDepartment_DL.GetByDepType("PRPD"); Load_Batches(objDepartment); dtStaff = objEmployee_DL.Get_By_RoleType("Staff", true); objSourceSupervisedBy.DataSource = dtStaff; cmbSupervisedBy.DataSource = objSourceSupervisedBy; txtHandedOver.Text = CurrentUser.UserEmp.EmployeeNameID; txtInspected.Text = CurrentUser.UserEmp.EmployeeNameID; } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void Load_Data() { try { dt = objDepartmentalPlanningWeeks_DL.GetData(); dgvDepartmentPlanningList.AutoGenerateColumns = false; objSource.DataSource = dt; dgvDepartmentPlanningList.DataSource = objSource; objSource.ResetBindings(true); objDepartment = objDepartment_DL.GetByDepType("RPD"); ColorGrid(); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void btnSendToStore_Click(object sender, EventArgs e) { try { DataTable dtReports = objQCReport_DL.Get_IsPackingQCPass(dgvActivity.CurrentRow.Cells["BatchID"].Value.ToString(), Convert.ToInt32(QCReport.ReportStatus.Accept), "Packing_Secondary"); if (dtReports.Rows.Count > 0) { MTN objMTN = new MTN(); objMTN.PackingBatch = Convert.ToInt64(dgvActivity.CurrentRow.Cells["BatchActID"].Value); objMTN.MTNEnterdBy = objEmployee_DL.Get(CurrentUser.EmployeeID); objMTN.MTNDepartmentTo = objDepartment_DL.GetByDepType("STORE"); objMTN.MTNStatus = MTN.Status.Initial; objMTN.MTNType = MTN.Type.Packing; objMTN.MTNItemType = MTN.ItemType.Finish_Product; int i = objMTN_DL.CreatePackingMTN_Secondary_toStores(objMTN, BatchActivity.Status.Transferred, dgvActivity.CurrentRow.Cells["SecondaryFinishProduct"].Value.ToString(), Convert.ToInt32(dgvActivity.CurrentRow.Cells["Qty"].Value), BatchActivity.Status.Finished, BatchActivity.Status.SecondaryPacking); if (i > 0) { MessageBox.Show(this, "Successfully sent to Stores. MTN No is :" + i.ToString(), "Successful", MessageBoxButtons.OK); } objBatch_DL.Update_Packed(dgvActivity.CurrentRow.Cells["BatchID"].Value.ToString(), (int)Batch.Status.Packed, (int)BatchActivity.Status.Transferred, (int)MTN.Status.Reject); //objBatch_DL.Update_BatchPackingCost(objBatchActivity.BatchActID); objBatch_DL.Update_BatchSeconderyPackingCost(objBatchActivity.BatchActID); Load_Activity(); } else { MessageBox.Show(this, "Packing QC is Not Passed", "Can not Proceed", MessageBoxButtons.OK); } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void btnSendToStore_Click(object sender, EventArgs e) { try { DataTable dtReports = objQCReport_DL.Get_IsPackingQCPass(objBatch.BatchID, Convert.ToInt32(QCReport.ReportStatus.Accept), "Rework"); if (dtReports.Rows.Count > 0) { MTN objMTN = new MTN(); objMTN.PackingBatch = Convert.ToInt64(dgvActivity.CurrentRow.Cells["BatchActID"].Value); objMTN.MTNEnterdBy = objEmployee_DL.Get(CurrentUser.EmployeeID); objMTN.MTNDepartmentTo = objDepartment_DL.GetByDepType("STORE"); objMTN.MTNStatus = MTN.Status.Initial; objMTN.MTNType = MTN.Type.Packing; objMTN.MTNItemType = MTN.ItemType.Finish_Product; int i = objMTN_DL.CreatePackingMTN_toStores(objMTN, BatchActivity.Status.Transferred, dgvActivity.CurrentRow.Cells["SecondaryFinishProduct"].Value.ToString(), Convert.ToInt32(dgvActivity.CurrentRow.Cells["Qty"].Value), BatchActivity.Status.Finished, BatchActivity.Status.SecondaryPacking); if (i > 0) { MessageBox.Show(this, "Successfully sent to Stores. MTN No is :" + i.ToString(), "Successful", MessageBoxButtons.OK); } else { MessageBox.Show(this, "Invalid Qty", "Unsuccessful", MessageBoxButtons.OK); } Load_Activity(); if (dgvBatcList.Rows.Count > 0) { if (dgvActivity.Rows.Count > 0) { DataGridViewCellEventArgs dr = new DataGridViewCellEventArgs(1, 0); dgvBatcList_CellClick(sender, dr); dgvActivity_CellClick(sender, dr); } else { dgvBatchLabourDetails.AutoGenerateColumns = false; objSourceBatchLabour.DataSource = null; dgvBatchLabourDetails.DataSource = objSourceBatchLabour; objSourceBatchLabour.ResetBindings(true); } } objBatch_DL.Update_Packed(objBatch.BatchID, (int)Batch.Status.Packed, (int)BatchActivity.Status.Transferred, (int)MTN.Status.Reject); txtTransferQty.Text = ""; } else { MessageBox.Show(this, "Packing QC is Not Passed", "Can not Proceed", MessageBoxButtons.OK); } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void btnSendToStore_Click(object sender, EventArgs e) { try { DataTable dtReports = objQCReport_DL.Get_IsPackingQCPass(dgvActivity.CurrentRow.Cells["BatchID"].Value.ToString(), Convert.ToInt32(QCReport.ReportStatus.Accept), "Packing"); if (dtReports.Rows.Count > 0) { if (!String.IsNullOrWhiteSpace(txtTransferQty.Text) && DataValidation.IsNumericNumber(txtTransferQty.Text)) { MTN objMTN = new MTN(); objMTN.PackingBatch = Convert.ToInt64(dgvActivity.CurrentRow.Cells["BatchActID"].Value); objMTN.MTNEnterdBy = objEmployee_DL.Get(CurrentUser.EmployeeID); objMTN.MTNDepartmentTo = objDepartment_DL.GetByDepType("STORE"); objMTN.MTNStatus = MTN.Status.Initial; objMTN.MTNType = MTN.Type.Packing; objMTN.MTNItemType = MTN.ItemType.Finish_Product; if (Convert.ToInt32(dgvActivity.CurrentRow.Cells["RemainningQty"].Value) < Convert.ToInt32(txtTransferQty.Text)) { MessageBox.Show(this, "Invalid Qty to Transfer", "UnSuccessful", MessageBoxButtons.OK); } else { int i = objMTN_DL.CreatePackingMTN_toStores(objMTN, BatchActivity.Status.Transferred, dgvActivity.CurrentRow.Cells["SecondaryFinishProduct"].Value.ToString(), Convert.ToInt32(txtTransferQty.Text), BatchActivity.Status.Finished, BatchActivity.Status.SecondaryPacking); objBatch_DL.Update_BatchPackingCost(objBatchActivity.BatchActID); if (i > 0) { MessageBox.Show(this, "Successfully sent to Stores. MTN No is :" + i.ToString(), "Successful", MessageBoxButtons.OK); } else { MessageBox.Show(this, "Invalid Qty", "Unsuccessful", MessageBoxButtons.OK); } objBatch_DL.Update_Packed(dgvActivity.CurrentRow.Cells["BatchID"].Value.ToString(), (int)Batch.Status.Packed, (int)BatchActivity.Status.Transferred, (int)MTN.Status.Reject); Load_Batch_List(); } txtTransferQty.Text = ""; btnSendToStore.Enabled = false; } else { MessageBox.Show(this, "please enter valid quantity", "MRP System", MessageBoxButtons.OK); } } else { MessageBox.Show(this, "Packing QC is Not Passed", "Can not Proceed", MessageBoxButtons.OK); } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void btnTransfer_Click(object sender, EventArgs e) { try { if (objPRPDBatch.Type != PRPDBatch.PRPDType.Rework) { if (objProcessed.MaterialCode != "") { MTN objMTN = new MTN(); objMTN.MTNDate = DateTime.Today; objMTN.MTNDepartmentFrom = objDepartment_DL.GetByDepType("PRPD"); objMTN.MTNDepartmentFromName = objMTN.MTNDepartmentFrom.DepName; objMTN.MTNDepartmentTo = objDepartment_DL.GetByDepType("Store"); objMTN.MTNEnterdBy = objEmployee_DL.Get(CurrentUser.EmployeeID); objMTN.MTNItemType = MTN.ItemType.Material; objMTN.MTNStatus = MTN.Status.Initial; objMTN.MTNType = MTN.Type.PRPD; int ID = objMTN_DL.Add_PRPDTransfer(objMTN); if (ID > 0) { objMTN.MTNNo = ID; MTNMaterial objMTNMat = new MTNMaterial(); objMTNMat.Description = "PRPD batch Transfer"; objMTNMat.Material = objProcessed; objMTNMat.MTN = objMTN; objMTNMat.TransferQty = objPRPDBatch.PRPDBatchFinalQty; objMTNMat.UnitRate = objPRPDBatch_DL.UnitPrice(objPRPDBatch.PRPDBatchID); objMTNMat.Batch = "No"; int res = objMTNMaterial_DL.Add(objMTNMat); if (res > 0) { objPRPDBatch.UnitCost = objPRPDBatch_DL.UnitPrice(objPRPDBatch.PRPDBatchID); objPRPDBatch.Status = PRPDBatch.PRPDBatchStatus.Transfered; objPRPDBatch.PRPDBatchHandOverBy = CurrentUser.UserEmp; objPRPDBatch.PRPDBatchMTNOUT = objMTN; objPRPDBatch_DL.Update_Transfer(objPRPDBatch); MessageBox.Show(this, "Successfully Transferd, MTN No :- " + objMTN.MTNNo.ToString(), "Successful", MessageBoxButtons.OK, MessageBoxIcon.Warning); Clear(); this.frmPRPDBatchTransfer_Preperation_Load(sender, e); } } } else { MessageBox.Show(this, "There are no Processed Materials", "Invalid Material", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MTN objMTN = new MTN(); objMTN.MTNDate = DateTime.Today; objMTN.MTNDepartmentFrom = objDepartment_DL.GetByDepType("PRPD"); objMTN.MTNDepartmentFromName = objMTN.MTNDepartmentFrom.DepName; objMTN.MTNDepartmentTo = objDepartment_DL.GetByDepType("Store"); objMTN.MTNEnterdBy = objEmployee_DL.Get(CurrentUser.EmployeeID); objMTN.MTNItemType = MTN.ItemType.Material; objMTN.MTNStatus = MTN.Status.Initial; objMTN.MTNType = MTN.Type.PRPD; int ID = objMTN_DL.Add_PRPDTransfer(objMTN); if (ID > 0) { objMTN.MTNNo = ID; MTNMaterial objMTNMat = new MTNMaterial(); objMTNMat.Description = "PRPD batch Transfer"; objMTNMat.Material = objProcessed; objMTNMat.MTN = objMTN; objMTNMat.TransferQty = objPRPDBatch.PRPDBatchFinalQty; objMTNMat.UnitRate = objPRPDBatch_DL.UnitPrice(objPRPDBatch.PRPDBatchID); objMTNMat.Batch = "No"; int res = objMTNMaterial_DL.Add(objMTNMat); if (res > 0) { objPRPDBatch.UnitCost = objPRPDBatch_DL.UnitPrice(objPRPDBatch.PRPDBatchID); objPRPDBatch.Status = PRPDBatch.PRPDBatchStatus.Transfered; objPRPDBatch.PRPDBatchHandOverBy = CurrentUser.UserEmp; objPRPDBatch.PRPDBatchMTNOUT = objMTN; objPRPDBatch_DL.Update_Transfer(objPRPDBatch); MessageBox.Show(this, "Successfully Transferd, MTN No :- " + objMTN.MTNNo.ToString(), "Successful", MessageBoxButtons.OK, MessageBoxIcon.Warning); Clear(); this.frmPRPDBatchTransfer_Preperation_Load(sender, e); } } } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }