public bool addDiscrepancyDetail(iDiscrepancyDetail idisd)
    {
        ReportDescrepancyController rd   = new ReportDescrepancyController();
        DiscrepancyDetail           disd = new DiscrepancyDetail();

        disd = changeiDisdtoDisdEntity(idisd);

        return(rd.insertDiscrepancyDetail(disd));
    }
示例#2
0
    public static iDiscrepancyDetail Make(string itemCode, int quantity, string amount, string isAdded, string reason)
    {
        iDiscrepancyDetail desd = new iDiscrepancyDetail();

        desd.itemCode = itemCode;
        desd.quantity = quantity;
        desd.amount   = amount;
        desd.isAdded  = isAdded;
        desd.reason   = reason;
        return(desd);
    }
    public DiscrepancyDetail changeiDisdtoDisdEntity(iDiscrepancyDetail idisd)
    {
        DiscrepancyDetail           disd = new DiscrepancyDetail();
        ReportDescrepancyController rd   = new ReportDescrepancyController();

        disd.DiscrepancyID = rd.getDiscrepancyID();
        disd.ItemCode      = idisd.ItemCode;
        if (idisd.Quantity < 0)
        {
            disd.Quantity = -1 * idisd.Quantity;
        }
        else
        {
            disd.Quantity = idisd.Quantity;
        }
        disd.Amount      = float.Parse(idisd.Amount);
        disd.IsAdded     = bool.Parse(idisd.IsAdded);
        disd.Reason      = idisd.Reason;
        disd.DeletedFlag = false;
        return(disd);
    }