public static List<string> RequestUPSGetSupportedAV() { string methodName = MethodBase.GetCurrentMethod().Name; logger.DebugFormat("BEGIN: {0}()", methodName); List<string> ret = new List<string>(); //Get UPS available AV partNo try { UPSPrimaryServiceSoapClient soapClient = new UPSPrimaryServiceSoapClient("UPS"); DataSet ds = soapClient.UPSGetSupportedAV(new DateTime(2000, 01, 01)); DataRowCollection drs = ds.Tables[0].Rows; foreach (DataRow dr in drs) { ret.Add(dr["TemplateName"].ToString().Trim()); } return ret; } catch (Exception e) { logger.Error(methodName, e); throw e; } finally { logger.DebugFormat("END: {0}()", methodName); } }
public static BomStatus RequestUPSSendBOM(UPSPOBOM po,List<string> avPartList) { string methodName = MethodBase.GetCurrentMethod().Name; logger.DebugFormat("BEGIN: {0}()", methodName); try { UPSPrimaryServiceSoapClient soapClient = new UPSPrimaryServiceSoapClient("UPS"); string txnId = DateTime.Now.ToString("yyyyMMddhhmmss.fff"); string bom = ""; foreach (string av in avPartList) { bom = bom + string.Format("<BomItem><PartNumber>{0}</PartNumber></BomItem>", av); } bom =string.Format("<BOM>{0}</BOM>",bom); logger.InfoFormat("UPSSendBOM txnId:{0} HPPO:{1} CustPO:{2} IECPO:{3) Qty:{4} Bom:{5}", txnId, po.HPPO, po.CustPO,po.IECPO, po.Qty, bom); return soapClient.UPSSendBOM(txnId, po.HPPO, po.CustPO, po.Qty, bom); } catch (Exception e) { logger.Error(methodName, e); throw e; } finally { logger.DebugFormat("END: {0}()", methodName); } }
public static BomStatus RequestUPSGetOSI(UPSPOBOM po) { string methodName = MethodBase.GetCurrentMethod().Name; logger.DebugFormat("BEGIN: {0}()", methodName); List<string> ret = new List<string>(); try { UPSPrimaryServiceSoapClient soapClient = new UPSPrimaryServiceSoapClient("UPS"); string txnId = DateTime.Now.ToString("yyyyMMddhhmmss.fff"); logger.InfoFormat("UPSGetOSI HPPO:{0}", po.HPPO); return soapClient.UPSGetOSI(po.HPPO); } catch (Exception e) { logger.Error(methodName, e); throw e; } finally { logger.DebugFormat("END: {0}()", methodName); } }