コード例 #1
0
 /// <summary>
 /// Call Proc [usp_select_SupplierInvoice]
 /// Get the supplier invoice by supplierinvoiceId
 /// </summary>
 /// <param name="supplierInvoiceId"></param>
 /// <returns></returns>
 public static SupplierInvoice Get(System.Int32?supplierInvoiceId)
 {
     Rebound.GlobalTrader.DAL.SupplierInvoiceDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.SupplierInvoice.Get(supplierInvoiceId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         SupplierInvoice obj = new SupplierInvoice();
         obj.SupplierInvoiceID     = objDetails.SupplierInvoiceID;
         obj.SupplierInvoiceNumber = objDetails.SupplierInvoiceNumber;
         obj.CompanyNo             = objDetails.CompanyNo;
         obj.ClientNo            = objDetails.ClientNo;
         obj.SupplierInvoiceDate = objDetails.SupplierInvoiceDate;
         obj.SupplierCode        = objDetails.SupplierCode;
         obj.SupplierName        = objDetails.SupplierName;
         obj.CurrencyNo          = objDetails.CurrencyNo;
         obj.InvoiceAmount       = objDetails.InvoiceAmount;
         obj.GoodsValue          = objDetails.GoodsValue;
         obj.Tax                 = objDetails.Tax;
         obj.DeliveryCharge      = objDetails.DeliveryCharge;
         obj.CreditCardFee       = objDetails.CreditCardFee;
         obj.BankFee             = objDetails.BankFee;
         obj.Exported            = objDetails.Exported;
         obj.Notes               = objDetails.Notes;
         obj.SecondRef           = objDetails.SecondRef;
         obj.Narrative           = objDetails.Narrative;
         obj.CanbeExported       = objDetails.CanbeExported;
         obj.URNNumber           = objDetails.URNNumber;
         obj.UpdatedBy           = objDetails.UpdatedBy;
         obj.DLUP                = objDetails.DLUP;
         obj.PurchaseOrderNumber = objDetails.PurchaseOrderNumber;
         obj.PurchaseOrderNo     = objDetails.PurchaseOrderNo;
         obj.CurrencyCode        = objDetails.CurrencyCode;
         obj.TaxNo               = objDetails.TaxNo;
         obj.TaxName             = objDetails.TaxName;
         obj.TaxCode             = objDetails.TaxCode;
         obj.StatusReasonId      = objDetails.StatusReasonId;
         obj.StatusReason        = objDetails.StatusReason;
         objDetails              = null;
         return(obj);
     }
 }
コード例 #2
0
 /// <summary>
 /// Get detail for supplier invoice detail page
 /// Call Proc [usp_select_SupplierInvoice_for_Page]
 /// </summary>
 /// <param name="supplierInvoiceId"></param>
 /// <returns></returns>
 public static SupplierInvoice GetForPage(System.Int32?supplierInvoiceId)
 {
     Rebound.GlobalTrader.DAL.SupplierInvoiceDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.SupplierInvoice.GetForPage(supplierInvoiceId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         SupplierInvoice obj = new SupplierInvoice();
         obj.SupplierInvoiceID     = objDetails.SupplierInvoiceID;
         obj.SupplierInvoiceNumber = objDetails.SupplierInvoiceNumber;
         obj.SupplierName          = objDetails.SupplierName;
         obj.CompanyNo             = objDetails.CompanyNo;
         obj.ClientNo = objDetails.ClientNo;
         objDetails   = null;
         return(obj);
     }
 }
コード例 #3
0
        /// <summary>
        /// Call Proc [usp_datalistnugget_SupplierInvoice]
        /// Get list of supplier invoice on basis of following search criteria
        /// </summary>
        /// <param name="clientId"></param>
        /// <param name="orderBy"></param>
        /// <param name="sortDir"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="supplierInvoiceNumber"></param>
        /// <param name="urnNoLo"></param>
        /// <param name="urnNoHi"></param>
        /// <param name="purchaseOrderNoLo"></param>
        /// <param name="purchaseOrderNoHi"></param>
        /// <param name="goodsInNoLo"></param>
        /// <param name="goodsInNoHi"></param>
        /// <param name="supplierInvoiceDateFrom"></param>
        /// <param name="supplierInvoiceDateTo"></param>
        /// <param name="cmSearch"></param>
        /// <param name="recentOnly"></param>
        /// <param name="cannotBeExported"></param>
        /// <returns></returns>
        public static List <SupplierInvoice> DataListNugget(System.Int32?clientId, System.Int32?orderBy, System.Int32?sortDir, System.Int32?pageIndex, System.Int32?pageSize, System.String supplierInvoiceNumber, System.Int32?urnNoLo, System.Int32?urnNoHi, System.Int32?purchaseOrderNoLo, System.Int32?purchaseOrderNoHi, System.Int32?goodsInNoLo, System.Int32?goodsInNoHi, System.DateTime?supplierInvoiceDateFrom, System.DateTime?supplierInvoiceDateTo, System.String cmSearch, System.Boolean?recentOnly, System.Boolean?exportedOnly, System.Boolean?approveandUnExported, System.Boolean?cannotBeExported, System.Int32?internalPurchaseOrderNoLo, System.Int32?internalPurchaseOrderNoHi, System.Int32?statusReason)
        {
            cannotBeExported = (cannotBeExported.HasValue) ? (!cannotBeExported.Value) : cannotBeExported;
            List <SupplierInvoiceDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.SupplierInvoice.DataListNugget(clientId, orderBy, sortDir, pageIndex, pageSize, supplierInvoiceNumber, urnNoLo, urnNoHi, purchaseOrderNoLo, purchaseOrderNoHi, goodsInNoLo, goodsInNoHi, supplierInvoiceDateFrom, supplierInvoiceDateTo, cmSearch, recentOnly, exportedOnly, approveandUnExported, cannotBeExported, internalPurchaseOrderNoLo, internalPurchaseOrderNoHi, statusReason);

            if (lstDetails == null)
            {
                return(new List <SupplierInvoice>());
            }
            else
            {
                List <SupplierInvoice> lst = new List <SupplierInvoice>();
                foreach (SupplierInvoiceDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.SupplierInvoice obj = new Rebound.GlobalTrader.BLL.SupplierInvoice();
                    obj.SupplierInvoiceID     = objDetails.SupplierInvoiceID;
                    obj.SupplierInvoiceNumber = objDetails.SupplierInvoiceNumber;
                    obj.SupplierName          = objDetails.SupplierName;
                    obj.CompanyNo             = objDetails.CompanyNo;
                    obj.GoodsInNumber         = objDetails.GoodsInNumber;
                    obj.GoodsInNo             = objDetails.GoodsInNo;
                    obj.PurchaseOrderNumber   = objDetails.PurchaseOrderNumber;
                    obj.SupplierInvoiceDate   = objDetails.SupplierInvoiceDate;
                    obj.Part                    = objDetails.Part;
                    obj.InvoiceAmount           = objDetails.InvoiceAmount;
                    obj.PurchaseOrderNo         = objDetails.PurchaseOrderNo;
                    obj.CurrencyNo              = objDetails.CurrencyNo;
                    obj.CurrencyCode            = objDetails.CurrencyCode;
                    obj.RowNum                  = objDetails.RowNum;
                    obj.RowCnt                  = objDetails.RowCnt;
                    obj.URNNumber               = objDetails.URNNumber;
                    obj.InternalPurchaseOrderId = objDetails.InternalPurchaseOrderId;
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }