//TO CHANGE APPROVE STATUS ACCEPT SUPPLY public ApproveResWCF[] changeapprovestatus(string ponumb) { int ponumber = Convert.ToInt32(ponumb); PurchaseOrderController.ChangeStatusToApproved(ponumber); ApproveResWCF apwcf = new ApproveResWCF(); apwcf.SuccessResult = true; List <ApproveResWCF> apwcfnew = new List <ApproveResWCF>(); apwcfnew.Add(apwcf); return(apwcfnew.ToArray <ApproveResWCF>()); }
//|||||||||||||||| public PurchaseOrderWCF[] purchaseorderlist(string SID) { List <PurchaseOrder> po = PurchaseOrderController.getsupplies(SID); List <PurchaseOrderWCF> ponew = new List <PurchaseOrderWCF>(); foreach (PurchaseOrder p in po) { PurchaseOrderWCF powcf = new PurchaseOrderWCF(); powcf.PoNumber = p.PONumber; powcf.SupplierCode = p.SupplierCode; powcf.DateCreated = Convert.ToString(p.DateCreated); powcf.Status = p.Status; ponew.Add(powcf); } return(ponew.ToArray <PurchaseOrderWCF>()); }
//||||||||||||||||||||||||||||| public PurchaseOrderDetailsWCF[] purchaseorderitem(string ponumb) { int ponumber = Convert.ToInt32(ponumb); List <PurchaseOrderDetail> pod = PurchaseOrderController.AcceptSupply(ponumber); List <PurchaseOrderDetailsWCF> podnew = new List <PurchaseOrderDetailsWCF>(); foreach (PurchaseOrderDetail po in pod) { PurchaseOrderDetailsWCF podwcf = new PurchaseOrderDetailsWCF(); podwcf.PoNumber = po.PONumber; podwcf.ItemNumber = po.ItemNumber; podwcf.Description = po.Description; podwcf.Quantity = Convert.ToInt32(po.Quantity); podwcf.Price = Convert.ToDouble(po.Price); podnew.Add(podwcf); } return(podnew.ToArray <PurchaseOrderDetailsWCF>()); }