privatevoidClearPageData() { var blankWP = Page.FindIForm("BlankWP") as WebPartBase; foreach (var control in blankWP.CamstarControls) { if (control.ClientID.EndsWith("_Btn_Packaging") || control.ClientID.EndsWith("_ContainerName")) continue;
protectedvirtual ResultStatus MaterialUnloadRecord(List<string> unloadList) { var result = new ResultStatus { IsSuccess = false, ExceptionData = new ExceptionDataType() };
try { var profile = FrameworkManagerUtil.GetFrameworkSession().CurrentUserProfile; var RCUSvc = new wzmResourceComponentUnloadService(profile);
var details = new List<wzmResourceComponentUnloadD>(); unloadList.ForEach(f => { details.Add(new wzmResourceComponentUnloadD { ListItemAction = ListItemAction.Add, wzmUnloadContainer = new ContainerRef(f) }); }); var RCUSvcData = new WCF.ObjectStack.wzmResourceComponentUnload { wzmResource = new NamedObjectRef(_Resource.Data.ToString()), wzmResourceComponentUnloadD = details.ToArray() };
result = RCUSvc.ExecuteTransaction(RCUSvcData, new wzmResourceComponentUnload_Request { Info = new wzmResourceComponentUnload_Info() }, out _);
string lot = _ContainerName.Data?.ToString(); string queryText = @" select mo.mfgordername, p.description, u.uomname, c.qty from container c inner join mfgorder mo on c.mfgorderid = mo.mfgorderid inner join product p on c.productid = p.productid inner join uom u on u.uomid = c.uomid where c.containername = :Lot ";
var res = _db.QueryDataTable(queryText, new { Lot = lot });
var profile = FrameworkManagerUtil.GetFrameworkSession().CurrentUserProfile; var svc = new wzmPackagingService(profile); var svcData = new OM.wzmPackaging { wzmNumberingRule = new NamedObjectRef(_NumberingRuleid.Data.ToString()) }; var svcReq = new wzmPackaging_Request { Info = new wzmPackaging_Info { wzmPackNR = new Info(true) } }; wzmPackaging_Result svcResult;
result = svc.ExecuteTransaction(svcData, svcReq, out svcResult);
if (!result.IsSuccess) { ClearPageData(); result.ExceptionData.Description = cpsPublic.Getlabelvalue("wzmPackaging_E0004"); return result; }