예제 #1
0
파일: Debit.cs 프로젝트: vinay1988/Ang6API
        //[001] code end
        /// <summary>
        /// ItemSearch
        /// Calls [usp_itemsearch_Debit]
        /// </summary>
        public static List <Debit> ItemSearch(System.Int32?clientId, System.Int32?orderBy, System.Int32?sortDir, System.Int32?pageIndex, System.Int32?pageSize, System.String contactSearch, System.String cmSearch, System.Int32?salesmanSearch, System.Int32?debitNoLo, System.Int32?debitNoHi, System.Int32?supplierRmaNoLo, System.Int32?supplierRmaNoHi, System.Int32?purchaseOrderNoLo, System.Int32?purchaseOrderNoHi, System.DateTime?debitDateFrom, System.DateTime?debitDateTo)
        {
            List <DebitDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.Debit.ItemSearch(clientId, orderBy, sortDir, pageIndex, pageSize, contactSearch, cmSearch, salesmanSearch, debitNoLo, debitNoHi, supplierRmaNoLo, supplierRmaNoHi, purchaseOrderNoLo, purchaseOrderNoHi, debitDateFrom, debitDateTo);

            if (lstDetails == null)
            {
                return(new List <Debit>());
            }
            else
            {
                List <Debit> lst = new List <Debit>();
                foreach (DebitDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.Debit obj = new Rebound.GlobalTrader.BLL.Debit();
                    obj.DebitId             = objDetails.DebitId;
                    obj.DebitNumber         = objDetails.DebitNumber;
                    obj.CompanyNo           = objDetails.CompanyNo;
                    obj.CompanyName         = objDetails.CompanyName;
                    obj.DebitDate           = objDetails.DebitDate;
                    obj.ContactNo           = objDetails.ContactNo;
                    obj.ContactName         = objDetails.ContactName;
                    obj.RaiserName          = objDetails.RaiserName;
                    obj.PurchaseOrderNumber = objDetails.PurchaseOrderNumber;
                    obj.SupplierRMANumber   = objDetails.SupplierRMANumber;
                    obj.RowNum = objDetails.RowNum;
                    obj.RowCnt = objDetails.RowCnt;
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }
예제 #2
0
파일: Debit.cs 프로젝트: vinay1988/Ang6API
        /// <summary>
        /// GetListForCompany
        /// Calls [usp_selectAll_Debit_for_Company]
        /// </summary>
        public static List <Debit> GetListForCompany(System.Int32?companyId)
        {
            List <DebitDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.Debit.GetListForCompany(companyId);

            if (lstDetails == null)
            {
                return(new List <Debit>());
            }
            else
            {
                List <Debit> lst = new List <Debit>();
                foreach (DebitDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.Debit obj = new Rebound.GlobalTrader.BLL.Debit();
                    obj.DebitId             = objDetails.DebitId;
                    obj.DebitNumber         = objDetails.DebitNumber;
                    obj.ClientNo            = objDetails.ClientNo;
                    obj.CompanyNo           = objDetails.CompanyNo;
                    obj.ContactNo           = objDetails.ContactNo;
                    obj.DebitDate           = objDetails.DebitDate;
                    obj.CurrencyNo          = objDetails.CurrencyNo;
                    obj.RaisedBy            = objDetails.RaisedBy;
                    obj.Buyer               = objDetails.Buyer;
                    obj.Notes               = objDetails.Notes;
                    obj.Instructions        = objDetails.Instructions;
                    obj.Freight             = objDetails.Freight;
                    obj.DivisionNo          = objDetails.DivisionNo;
                    obj.TaxNo               = objDetails.TaxNo;
                    obj.PurchaseOrderNo     = objDetails.PurchaseOrderNo;
                    obj.SupplierRMANo       = objDetails.SupplierRMANo;
                    obj.ReferenceDate       = objDetails.ReferenceDate;
                    obj.SupplierInvoice     = objDetails.SupplierInvoice;
                    obj.SupplierRMA         = objDetails.SupplierRMA;
                    obj.SupplierCredit      = objDetails.SupplierCredit;
                    obj.UpdatedBy           = objDetails.UpdatedBy;
                    obj.DLUP                = objDetails.DLUP;
                    obj.CompanyName         = objDetails.CompanyName;
                    obj.ContactName         = objDetails.ContactName;
                    obj.CurrencyCode        = objDetails.CurrencyCode;
                    obj.CurrencyDescription = objDetails.CurrencyDescription;
                    obj.RaiserName          = objDetails.RaiserName;
                    obj.BuyerName           = objDetails.BuyerName;
                    obj.TeamNo              = objDetails.TeamNo;
                    obj.DivisionName        = objDetails.DivisionName;
                    obj.TaxName             = objDetails.TaxName;
                    obj.PurchaseOrderNumber = objDetails.PurchaseOrderNumber;
                    obj.PurchaseOrderDate   = objDetails.PurchaseOrderDate;
                    obj.SupplierRMANumber   = objDetails.SupplierRMANumber;
                    obj.DebitValue          = objDetails.DebitValue;
                    obj.TaxRate             = objDetails.TaxRate;
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }