Beispiel #1
0
    public static WCFDisbursementItem Make(int disbursementid, string itemcode, int allocatedquantity, int?actualquantity, string supplier1, string supplier2, string supplier3)
    {
        WCFDisbursementItem ditem = new WCFDisbursementItem();

        ditem.disbursementid    = disbursementid;
        ditem.itemcode          = itemcode;
        ditem.allocatedquantity = allocatedquantity;
        ditem.actualquantity    = actualquantity;
        ditem.Supplier1         = supplier1;
        ditem.Supplier2         = supplier2;
        ditem.Supplier3         = supplier3;
        return(ditem);
    }
Beispiel #2
0
    public WCFDisbursementItem[] findDeliverDisburseItemByDisburseid(string id)
    {
        List <string>              names     = id.Split(',').ToList <string>();
        List <DisbursementItem>    items     = scmanager.findDeliverDisburseItemByDisburseid(names[0], names[1]);
        List <WCFDisbursementItem> itemarray = new List <WCFDisbursementItem>();

        foreach (DisbursementItem i in items)
        {
            int?allocated            = i.allocatedquantity;
            WCFDisbursementItem item = WCFDisbursementItem.Make(i.disbursementid, i.itemcode, i.allocatedquantity, allocated, i.Item.supplier1, i.Item.supplier2, i.Item.supplier3);
            itemarray.Add(item);
        }
        return(itemarray.ToArray());
    }