private int GetCompanny2() { int cID = 0; var wo = new MyWorkorder(_woID); if (wo.Value != null) { cID = Convert.ToInt32(wo.Value.Company2); } return(cID); }
private int GetItemRequirement() { var wo = new MyWorkorder(_woID); if (wo.Value.woType == (int)NWorkorderType.Service) { return((int)NWorkorderRequirement.Service); } if (wo.Value.woType == (int)NWorkorderType.Sitecheck) { return((int)NWorkorderRequirement.SiteCheck); } return((int)NWorkorderRequirement.Installation); }
private void SetValidationID() { ValidationID = 0; //Lockec var wos = new WorkOrderSelect(_woID); if (wos.IsLocked()) { ValidationID = (int)NValidationErrorValue.WorkorderLockedCanNotAddNewItem; return; } //IS service or Site check var wo = new MyWorkorder(_woID); if (wo.Value.woType == (int)NWorkorderType.Service | wo.Value.woType == (int)NWorkorderType.Sitecheck | wo.Value.woType == (int)NWorkorderType.Production) { return; } //IS there a reason if (wo.Value.addNewItemReason != null) { string reason1 = Convert.ToString(wo.Value.addNewItemReason); if (reason1.Length >= 10) { return; } } ValidationID = (int)NValidationErrorValue.WorkorderAddNewItem; }