コード例 #1
0
        /// <summary>
        /// Update header after updating supplier invoice line
        /// Call Proc [usp_updateHeader_SupplierInvoice]
        /// </summary>
        /// <param name="supplierInvoiceId"></param>
        /// <param name="secondRef"></param>
        /// <param name="narrative"></param>
        /// <param name="canBeExported"></param>
        /// <param name="updatedBy"></param>
        /// <returns></returns>
        //public static bool UpdateHeader(System.Int32 supplierInvoiceId, System.String secondRef, System.String narrative,System.Boolean? canBeExported, System.Int32 updatedBy)
        //{
        //    return Rebound.GlobalTrader.DAL.SiteProvider.SupplierInvoice.UpdateHeader(supplierInvoiceId, secondRef, narrative,canBeExported, updatedBy);

        //}

        /// <summary>
        /// GetForPrint
        /// Calls [usp_select_ClientInvoice_for_Print]
        /// </summary>
        public static ClientInvoice GetForPrint(System.Int32?clientInvoiceId)
        {
            Rebound.GlobalTrader.DAL.ClientInvoiceDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.ClientInvoice.GetForPrint(clientInvoiceId);
            if (objDetails == null)
            {
                return(null);
            }
            else
            {
                ClientInvoice obj = new ClientInvoice();
                obj.ClientInvoiceID     = objDetails.ClientInvoiceID;
                obj.ClientNo            = objDetails.ClientNo;
                obj.ClientInvoiceNumber = objDetails.ClientInvoiceNumber;
                obj.ClientInvoiceDate   = objDetails.ClientInvoiceDate;
                obj.ClientShipTo        = objDetails.ClientShipTo;
                obj.ClientBillto        = objDetails.ClientBillto;
                obj.Fax          = objDetails.Fax;
                obj.Telephone    = objDetails.Telephone;
                obj.CustomerCode = objDetails.CustomerCode;
                obj.Vat          = objDetails.Vat;
                obj.Email        = objDetails.Email;
                obj.TaxRate      = objDetails.TaxRate;
                obj.TaxName      = objDetails.TaxName;
                obj.CurrencyNo   = objDetails.CurrencyNo;
                obj.CurrencyCode = objDetails.CurrencyCode;
                obj.Tax          = objDetails.Tax;
                objDetails       = null;
                return(obj);
            }
        }
コード例 #2
0
        /// <summary>
        /// Call Proc [usp_select_ClientInvoice]
        /// Get the Client invoice by ClientinvoiceId
        /// </summary>
        /// <param name="ClientInvoiceId"></param>
        /// <returns></returns>
        public static ClientInvoice Get(System.Int32?clientInvoiceId)
        {
            Rebound.GlobalTrader.DAL.ClientInvoiceDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.ClientInvoice.Get(clientInvoiceId);
            if (objDetails == null)
            {
                return(null);
            }
            else
            {
                ClientInvoice obj = new ClientInvoice();
                obj.ClientInvoiceID     = objDetails.ClientInvoiceID;
                obj.ClientInvoiceNumber = objDetails.ClientInvoiceNumber;
                obj.CompanyNo           = objDetails.CompanyNo;
                obj.ClientNo            = objDetails.ClientNo;
                obj.ClientInvoiceDate   = objDetails.ClientInvoiceDate;
                obj.SupplierCode        = objDetails.SupplierCode;
                obj.Clientname          = objDetails.Clientname;
                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.InternalPurchaseOrderNo     = objDetails.InternalPurchaseOrderNo;
                obj.InternalPurchaseOrderNumber = objDetails.InternalPurchaseOrderNumber;
                obj.SalesmanName                = objDetails.SalesmanName;
                obj.DivisionNo                  = objDetails.DivisionNo;
                obj.SalesmanNo                  = objDetails.SalesmanNo;
                obj.DivisionName                = objDetails.DivisionName;
                obj.InvoiceClientNo             = objDetails.InvoiceClientNo;

                objDetails = null;
                return(obj);
            }
        }
コード例 #3
0
 /// <summary>
 /// Get detail for supplier invoice detail page
 /// Call Proc [usp_select_ClientInvoice_for_Page]
 /// </summary>
 /// <param name="clientInvoiceId"></param>
 /// <returns></returns>
 public static ClientInvoice GetForPage(System.Int32?clientInvoiceId, System.Boolean?isPOHub)
 {
     Rebound.GlobalTrader.DAL.ClientInvoiceDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.ClientInvoice.GetForPage(clientInvoiceId, isPOHub);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         ClientInvoice obj = new ClientInvoice();
         obj.ClientInvoiceID     = objDetails.ClientInvoiceID;
         obj.ClientInvoiceNumber = objDetails.ClientInvoiceNumber;
         obj.Clientname          = objDetails.Clientname;
         obj.CompanyNo           = objDetails.CompanyNo;
         obj.ClientNo            = objDetails.ClientNo;
         objDetails = null;
         return(obj);
     }
 }
コード例 #4
0
        /// <summary>
        /// Call Proc [usp_datalistnugget_ClientInvoice]
        /// Get list of Client 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="ClientInvoiceDateFrom"></param>
        /// <param name="ClientInvoiceDateTo"></param>
        /// <param name="cmSearch"></param>
        /// <param name="recentOnly"></param>
        /// <param name="cannotBeExported"></param>
        /// <returns></returns>
        public static List <ClientInvoice> DataListNugget(System.Int32?clientId, System.Int32?orderBy, System.Int32?sortDir, System.Int32?pageIndex, System.Int32?pageSize, System.Int32?CINoLo, System.Int32?CINoHi, System.Int32?urnNoLo, System.Int32?urnNoHi, System.Int32?purchaseOrderNoLo, System.Int32?purchaseOrderNoHi, System.Int32?goodsInNoLo, System.Int32?goodsInNoHi, System.DateTime?clientInvoiceDateFrom, System.DateTime?clientInvoiceDateTo, System.String cmSearch, System.Boolean?recentOnly, System.Boolean?exportedOnly, System.Boolean?approveandUnExported, System.Boolean?cannotBeExported, System.Int32?selectedClientNo, System.Boolean?isPOHub)
        {
            cannotBeExported = (cannotBeExported.HasValue) ? (!cannotBeExported.Value) : cannotBeExported;
            List <ClientInvoiceDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.ClientInvoice.DataListNugget(clientId, orderBy, sortDir, pageIndex, pageSize, CINoLo, CINoHi, urnNoLo, urnNoHi, purchaseOrderNoLo, purchaseOrderNoHi, goodsInNoLo, goodsInNoHi, clientInvoiceDateFrom, clientInvoiceDateTo, cmSearch, recentOnly, exportedOnly, approveandUnExported, cannotBeExported, selectedClientNo, isPOHub);

            if (lstDetails == null)
            {
                return(new List <ClientInvoice>());
            }
            else
            {
                List <ClientInvoice> lst = new List <ClientInvoice>();
                foreach (ClientInvoiceDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.ClientInvoice obj = new Rebound.GlobalTrader.BLL.ClientInvoice();
                    obj.ClientInvoiceID     = objDetails.ClientInvoiceID;
                    obj.ClientInvoiceNumber = objDetails.ClientInvoiceNumber;
                    obj.Clientname          = objDetails.Clientname;
                    obj.CompanyNo           = objDetails.CompanyNo;
                    obj.GoodsInNumber       = objDetails.GoodsInNumber;
                    obj.GoodsInNo           = objDetails.GoodsInNo;
                    obj.PurchaseOrderNumber = objDetails.PurchaseOrderNumber;
                    obj.ClientInvoiceDate   = objDetails.ClientInvoiceDate;
                    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.InternalPurchaseOrderNo     = objDetails.InternalPurchaseOrderNo;
                    obj.InternalPurchaseOrderNumber = objDetails.InternalPurchaseOrderNumber;
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }
コード例 #5
0
        /// <summary>
        /// ItemSearch
        /// Calls [usp_itemsearch_ClientInvoice]
        /// </summary>
        public static List <ClientInvoice> ItemSearch(System.Int32?clientId, System.Int32?orderBy, System.Int32?sortDir, System.Int32?pageIndex, System.Int32?pageSize, System.Int32?GoodsInNoLo, System.Int32?GoodsInNoHi, System.Int32?invoiceNoLo, System.Int32?invoiceNoHi, System.DateTime?invoiceDateFrom, System.DateTime?invoiceDateTo, System.Int32?ClientDebitNoLo, System.Int32?ClientDebitNoHi)
        {
            List <ClientInvoiceDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.ClientInvoice.ItemSearch(clientId, orderBy, sortDir, pageIndex, pageSize, GoodsInNoLo, GoodsInNoHi, invoiceNoLo, invoiceNoHi, invoiceDateFrom, invoiceDateTo, ClientDebitNoLo, ClientDebitNoHi);

            if (lstDetails == null)
            {
                return(new List <ClientInvoice>());
            }
            else
            {
                List <ClientInvoice> lst = new List <ClientInvoice>();
                foreach (ClientInvoiceDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.ClientInvoice obj = new Rebound.GlobalTrader.BLL.ClientInvoice();
                    obj.ClientInvoiceID     = objDetails.ClientInvoiceID;
                    obj.ClientInvoiceNumber = objDetails.ClientInvoiceNumber;
                    obj.CompanyNo           = objDetails.CompanyNo;
                    obj.ClientCompanyName   = objDetails.ClientCompanyName;
                    obj.ClientInvoiceDate   = objDetails.ClientInvoiceDate;
                    obj.ContactNo           = objDetails.ContactNo;
                    obj.ContactName         = objDetails.ContactName;
                    obj.SalesmanName        = objDetails.SalesmanName;
                    obj.CustomerPO          = objDetails.CustomerPO;
                    obj.SalesOrderNumber    = objDetails.SalesOrderNumber;
                    obj.GoodsInNo           = objDetails.GoodsInNo;
                    obj.RowNum              = objDetails.RowNum;
                    obj.RowCnt              = objDetails.RowCnt;
                    obj.Narrative           = objDetails.Narrative;
                    obj.SecondRef           = objDetails.SecondRef;
                    obj.ClientInvoiceLineNo = objDetails.ClientInvoiceLineNo;
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }