internal List <Sample> GetOrderSamples(string ORDNAME, string SUPNAME, string PARTNAME) { string query = "MED_SAMPLE?$filter=EFI_PORDNAME eq '" + ORDNAME + "' and SUPNAME eq '" + SUPNAME + "' and PARTNAME eq '" + PARTNAME + "' and STATDES ne 'מבוטלת'&$expand=MED_EXTFILES_SUBFORM"; string res = Call_Get(query); SamplesWarpper ow = JsonConvert.DeserializeObject <SamplesWarpper>(res); return(ow.Value); }
internal List<SampleAttachments> GetSampleAttachments(string DOCNO) { string query = "MED_SAMPLE?$filter=DOCNO eq '" + DOCNO + "'&$expand=MED_EXTFILES_SUBFORM"; string res = Call_Get(query); SamplesWarpper ow = JsonConvert.DeserializeObject<SamplesWarpper>(res); if(null == ow.Value || null == ow.Value[0].MED_EXTFILES_SUBFORM || ow.Value[0].MED_EXTFILES_SUBFORM.Count == 0) return new List<SampleAttachments>(); return ow.Value[0].MED_EXTFILES_SUBFORM; }
internal Sample GetProductSamples(string DOCNO) { string query = "MED_SAMPLE?$filter=DOCNO eq '" + DOCNO + "' and STATDES ne 'מבוטלת'&$expand=MED_TRANSSAMPLEQA_SUBFORM($expand=MED_RESULTDET_SUBFORM),MED_EXTFILES_SUBFORM"; string res = Call_Get(query); SamplesWarpper ow = JsonConvert.DeserializeObject <SamplesWarpper>(res); if ((null != ow) && (null != ow.Value) && (ow.Value.Count > 0)) { return(ow.Value[0]); } return(new Sample()); }
internal Sample GetOrderProductTests(string DOCNO, string qaCode) { // /MED_SAMPLE?$filter=PARTNAME eq '23559000' and SUPNAME eq '20523'&$expand=MED_TRANSSAMPLEQA_SUBFORM($filter=QACODE eq '007';$expand=MED_RESULTDET_SUBFORM) string query = "MED_SAMPLE?$filter=DOCNO eq '" + DOCNO + "'&$expand=MED_TRANSSAMPLEQA_SUBFORM($filter=QACODE eq '" + qaCode + "';$expand=MED_RESULTDET_SUBFORM)"; string res = Call_Get(query); SamplesWarpper ow = JsonConvert.DeserializeObject <SamplesWarpper>(res); if ((null != ow) && (null != ow.Value) && (ow.Value.Count > 0)) { return(ow.Value[0]); } return(new Sample()); }
internal Sample GetProductSamples(string supplierName, string orderName, string partName, int ordLine) { // MED_SAMPLE ?$filter = PARTNAME eq '23559000' and SUPNAME eq '20523' &$expand = MED_TRANSSAMPLEQA_SUBFORM string query = "MED_SAMPLE?$filter=EFI_PORDNAME eq '" + orderName + "' and PARTNAME eq '" + partName + "' and SUPNAME eq '" + supplierName + "' and STATDES ne 'מבוטלת'&$select=EFI_RAR_DES, CURDATE,DOCNO,SUPNAME,STATDES,PARTNAME,PARTDES,SERIALNAME,SHR_SERIAL_QUANT,SHR_QUANT,SHR_SAMPLE_STD_CODE,QUANT,SHR_DRAW,SHR_RAR,MAX_REJECT &$expand=MED_TRANSSAMPLEQA_SUBFORM($expand=MED_RESULTDET_SUBFORM)"; string res = Call_Get(query); SamplesWarpper ow = JsonConvert.DeserializeObject <SamplesWarpper>(res); if ((null != ow) && (null != ow.Value) && (ow.Value.Count > 0)) { return(ow.Value[0]); } return(new Sample()); }