private bool ValidateOperNum() { if (!OperNumValidated) { if (string.IsNullOrEmpty(OperNumEdit.Text)) { OperNumValidated = false; } else { string Operation = OperNumEdit.Text, Wc = WorkCenterText.Text, QtyReceived = ""; OperNumValidated = CSIJobRoutes.GetOperationInfor(CSISystemContext, JobEdit.Text, SuffixEdit.Text, ref Operation, ref Wc, ref QtyReceived); if (OperNumValidated) { OperNumEdit.Text = Operation; WorkCenterText.Text = Wc; } else { WorkCenterText.Text = string.Empty; } } } EnableDisableComponents(); return(OperNumValidated); }
private bool ValidateSuffix() { if (!SuffixValidated) { if (string.IsNullOrEmpty(SuffixEdit.Text)) { SuffixValidated = false; } else { SuffixEdit.Text = SuffixEdit.Text; try { string Job = JobEdit.Text, Suffix = SuffixEdit.Text, Desc = JobDescText.Text, Item = ItemText.Text , ItemDesc = ItemDescText.Text, ItemUM = ItemUMText.Text, QtyReleased = QtyReleasedText.Text , QtyComplete = "", QtyRequired = ""; //validate Job and Suffix SuffixValidated = CSIJobs.GetJobInfor(CSISystemContext, ref Job, ref Suffix, ref Desc, ref Item , ref ItemDesc, ref ItemUM, ref QtyReleased, ref QtyComplete, ref QtyRequired, ref LotTracked, ref SNTracked); if (SuffixValidated == true) { JobEdit.Text = Job; SuffixEdit.Text = Suffix; JobDescText.Text = Desc; ItemText.Text = Item; ItemDescText.Text = ItemDesc; ItemUMText.Text = ItemUM; QtyReleasedText.Text = QtyReleased; //validate OperNum if (string.IsNullOrEmpty(QtyEdit.Text) || decimal.Parse(QtyEdit.Text) == 0) { QtyEdit.Text = QtyRequired; OperNumValidated = false; ValidateQty(); } //Validate OperNum string Operation = OperNumEdit.Text, Wc = WorkCenterText.Text, QtyReceived = ""; bool RtnSLJobRoutes = CSIJobRoutes.GetOperationInfor(CSISystemContext, JobEdit.Text, SuffixEdit.Text, ref Operation, ref Wc, ref QtyReceived); if (RtnSLJobRoutes == true) { OperNumEdit.Text = Operation; OperNumValidated = false; ValidateOperNum(); WorkCenterText.Text = Wc; } //Validate ItemLoc string Loc = LocEdit.Text, LocDescription = "", Qty = ""; bool RtnCSIItemLocs = CSIItemLocs.GetItemLocInfor(CSISystemContext, ItemText.Text, WhseEdit.Text, ref Loc, ref LocDescription, ref Qty); if (RtnCSIItemLocs == true) { LocEdit.Text = Loc; LocDescText.Text = LocDescription; LocValidated = false; ValidateLoc(); //OnHandQuantityText.Text = Qty; //used for validate Qty } } else { JobDescText.Text = string.Empty; ItemText.Text = string.Empty; ItemDescText.Text = string.Empty; ItemUMText.Text = string.Empty; } } catch (Exception Ex) { WriteErrorLog(Ex); SuffixValidated = false; } } } EnableDisableComponents(); return(SuffixValidated); }
private bool ValidateJob() { if (!JobValidated) { if (string.IsNullOrEmpty(JobEdit.Text)) { JobValidated = false; } else { try { SuffixEdit.Text = SuffixEdit.Text; string Job = JobEdit.Text, Suffix = SuffixEdit.Text, Desc = JobDescText.Text, Item = JobItemText.Text , ItemDesc = ItemDescText.Text, ItemUM = JobItemUMText.Text, QtyReleased = QtyReleasedText.Text , QtyComplete = "", QtyRequired = ""; //validate Job and Suffix JobValidated = CSIJobs.GetJobInfor(CSISystemContext, ref Job, ref Suffix, ref Desc, ref Item , ref ItemDesc, ref ItemUM, ref QtyReleased, ref QtyComplete, ref QtyRequired, ref LotTracked, ref SNTracked); if (JobValidated == true) { JobEdit.Text = Job; SuffixEdit.Text = Suffix; JobDescText.Text = Desc; JobItemText.Text = Item; JobItemDescText.Text = ItemDesc; JobItemUMText.Text = ItemUM; QtyReleasedText.Text = QtyReleased; SuffixValidated = true; //validate OperNum if (string.IsNullOrEmpty(QtyEdit.Text) || decimal.Parse(QtyEdit.Text) == 0) { QtyEdit.Text = QtyRequired; OperNumValidated = false; ValidateQty(); } //Validate OperNum string Operation = OperNumEdit.Text, Wc = "", QtyReceived = ""; bool RtnSLJobRoutes = CSIJobRoutes.GetOperationInfor(CSISystemContext, JobEdit.Text, SuffixEdit.Text, ref Operation, ref Wc, ref QtyReceived); if (RtnSLJobRoutes == true) { OperNumEdit.Text = Operation; OperNumValidated = false; ValidateOperNum(); } } else { JobDescText.Text = string.Empty; JobItemText.Text = string.Empty; JobItemDescText.Text = string.Empty; JobItemUMText.Text = string.Empty; } } catch (Exception Ex) { WriteErrorLog(Ex); JobValidated = false; } } } EnableDisableComponents(); return(JobValidated); }