예제 #1
0
 /// <summary>
 /// GetForPage
 /// Calls [usp_select_RecieveCustomerRMA_for_Page]
 /// </summary>
 public static CustomerRma GetForRecievePage(System.Int32?customerRmaId)
 {
     Rebound.GlobalTrader.DAL.CustomerRmaDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.CustomerRma.GetForRecievePage(customerRmaId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         CustomerRma obj = new CustomerRma();
         obj.CustomerRMAId     = objDetails.CustomerRMAId;
         obj.CustomerRMANumber = objDetails.CustomerRMANumber;
         obj.ClientNo          = objDetails.ClientNo;
         obj.CompanyNo         = objDetails.CompanyNo;
         obj.CompanyName       = objDetails.CompanyName;
         //[001] code start
         obj.IsPDFAvailable = objDetails.IsPDFAvailable;
         //[001] code end
         obj.TeamNo                 = objDetails.TeamNo;
         obj.DivisionNo             = objDetails.DivisionNo;
         obj.Salesman               = objDetails.Salesman;
         obj.ClientName             = objDetails.ClientName;
         obj.ClientBaseCurrencyCode = objDetails.ClientBaseCurrencyCode;
         obj.ClientBaseCurrencyID   = objDetails.ClientBaseCurrencyID;
         objDetails                 = null;
         return(obj);
     }
 }
예제 #2
0
 /// <summary>
 /// GetForPrint
 /// Calls [usp_select_CustomerRMA_for_Print]
 /// </summary>
 public static CustomerRma GetForPrint(System.Int32?customerRmaId)
 {
     Rebound.GlobalTrader.DAL.CustomerRmaDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.CustomerRma.GetForPrint(customerRmaId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         CustomerRma obj = new CustomerRma();
         obj.CustomerRMAId     = objDetails.CustomerRMAId;
         obj.ClientNo          = objDetails.ClientNo;
         obj.CustomerRMANumber = objDetails.CustomerRMANumber;
         obj.InvoiceNo         = objDetails.InvoiceNo;
         obj.AuthorisedBy      = objDetails.AuthorisedBy;
         obj.CustomerRMADate   = objDetails.CustomerRMADate;
         obj.Notes             = objDetails.Notes;
         obj.Instructions      = objDetails.Instructions;
         obj.ShipViaNo         = objDetails.ShipViaNo;
         obj.Account           = objDetails.Account;
         obj.WarehouseNo       = objDetails.WarehouseNo;
         obj.CompanyNo         = objDetails.CompanyNo;
         obj.ContactNo         = objDetails.ContactNo;
         obj.DivisionNo        = objDetails.DivisionNo;
         obj.UpdatedBy         = objDetails.UpdatedBy;
         obj.DLUP                = objDetails.DLUP;
         obj.InvoiceNumber       = objDetails.InvoiceNumber;
         obj.AuthoriserName      = objDetails.AuthoriserName;
         obj.WarehouseName       = objDetails.WarehouseName;
         obj.CompanyName         = objDetails.CompanyName;
         obj.ContactName         = objDetails.ContactName;
         obj.DivisionName        = objDetails.DivisionName;
         obj.SalesOrderNo        = objDetails.SalesOrderNo;
         obj.SalesOrderNumber    = objDetails.SalesOrderNumber;
         obj.CurrencyNo          = objDetails.CurrencyNo;
         obj.Salesman            = objDetails.Salesman;
         obj.CurrencyCode        = objDetails.CurrencyCode;
         obj.CurrencyDescription = objDetails.CurrencyDescription;
         obj.ShipViaName         = objDetails.ShipViaName;
         obj.SalesmanName        = objDetails.SalesmanName;
         obj.TaxNo               = objDetails.TaxNo;
         obj.TaxName             = objDetails.TaxName;
         obj.InvoiceDate         = objDetails.InvoiceDate;
         obj.Quantity            = objDetails.Quantity;
         obj.QuantityReceived    = objDetails.QuantityReceived;
         obj.IncotermNo          = objDetails.IncotermNo;
         obj.IncotermName        = objDetails.IncotermName;
         obj.CompanyTelephone    = objDetails.CompanyTelephone;
         obj.CompanyFax          = objDetails.CompanyFax;
         obj.ShipViaName         = objDetails.ShipViaName;
         obj.CustomerPO          = objDetails.CustomerPO;
         obj.TermsName           = objDetails.TermsName;
         obj.ContactEmail        = objDetails.ContactEmail;
         obj.IncotermName        = objDetails.IncotermName;
         obj.CustomerRejectionNo = objDetails.CustomerRejectionNo;
         objDetails              = null;
         return(obj);
     }
 }
예제 #3
0
        //[003] end
        #endregion

        /// <summary>
        /// Returns a new CustomerRmaDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual CustomerRmaDetails GetCustomerRmaFromReader(DbDataReader reader)
        {
            CustomerRmaDetails customerRma = new CustomerRmaDetails();

            if (reader.HasRows)
            {
                customerRma.CustomerRMAId     = GetReaderValue_Int32(reader, "CustomerRMAId", 0);                      //From: [Table]
                customerRma.ClientNo          = GetReaderValue_Int32(reader, "ClientNo", 0);                           //From: [Table]
                customerRma.CustomerRMANumber = GetReaderValue_Int32(reader, "CustomerRMANumber", 0);                  //From: [usp_select_Credit]
                customerRma.InvoiceNo         = GetReaderValue_NullableInt32(reader, "InvoiceNo", null);               //From: [Table]
                customerRma.AuthorisedBy      = GetReaderValue_Int32(reader, "AuthorisedBy", 0);                       //From: [Table]
                customerRma.CustomerRMADate   = GetReaderValue_DateTime(reader, "CustomerRMADate", DateTime.MinValue); //From: [usp_select_Credit]
                customerRma.Notes             = GetReaderValue_String(reader, "Notes", "");                            //From: [Table]
                customerRma.Instructions      = GetReaderValue_String(reader, "Instructions", "");                     //From: [Table]
                customerRma.ShipViaNo         = GetReaderValue_NullableInt32(reader, "ShipViaNo", null);               //From: [Table]
                customerRma.Account           = GetReaderValue_String(reader, "Account", "");                          //From: [Table]
                customerRma.WarehouseNo       = GetReaderValue_Int32(reader, "WarehouseNo", 0);                        //From: [Table]
                customerRma.CompanyNo         = GetReaderValue_Int32(reader, "CompanyNo", 0);                          //From: [Table]
                customerRma.ContactNo         = GetReaderValue_NullableInt32(reader, "ContactNo", null);               //From: [Table]
                customerRma.DivisionNo        = GetReaderValue_Int32(reader, "DivisionNo", 0);                         //From: [Table]
                customerRma.UpdatedBy         = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);               //From: [Table]
                customerRma.DLUP                = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);          //From: [Table]
                customerRma.IncotermNo          = GetReaderValue_NullableInt32(reader, "IncotermNo", null);            //From: [Table]
                customerRma.CompanyName         = GetReaderValue_String(reader, "CompanyName", "");                    //From: [usp_select_Credit]
                customerRma.SalesmanName        = GetReaderValue_String(reader, "SalesmanName", "");                   //From: [usp_select_Credit]
                customerRma.AuthoriserName      = GetReaderValue_String(reader, "AuthoriserName", "");                 //From: [usp_itemsearch_CustomerRMA]
                customerRma.InvoiceNumber       = GetReaderValue_Int32(reader, "InvoiceNumber", 0);                    //From: [usp_select_Credit]
                customerRma.RowCnt              = GetReaderValue_NullableInt32(reader, "RowCnt", null);                //From: [usp_datalistnugget_CustomerRequirement]
                customerRma.WarehouseName       = GetReaderValue_String(reader, "WarehouseName", "");                  //From: [usp_select_CustomerRMA]
                customerRma.ContactName         = GetReaderValue_String(reader, "ContactName", "");                    //From: [usp_select_Credit]
                customerRma.DivisionName        = GetReaderValue_String(reader, "DivisionName", "");                   //From: [usp_select_Credit]
                customerRma.SalesOrderNo        = GetReaderValue_NullableInt32(reader, "SalesOrderNo", null);          //From: [usp_select_Credit]
                customerRma.SalesOrderNumber    = GetReaderValue_Int32(reader, "SalesOrderNumber", 0);                 //From: [usp_select_Credit]
                customerRma.CurrencyNo          = GetReaderValue_Int32(reader, "CurrencyNo", 0);                       //From: [Table]
                customerRma.Salesman            = GetReaderValue_Int32(reader, "Salesman", 0);                         //From: [Table]
                customerRma.CurrencyCode        = GetReaderValue_String(reader, "CurrencyCode", "");                   //From: [usp_select_Credit]
                customerRma.CurrencyDescription = GetReaderValue_String(reader, "CurrencyDescription", "");            //From: [usp_select_Credit]
                customerRma.ShipViaName         = GetReaderValue_String(reader, "ShipViaName", "");                    //From: [usp_select_Credit]
                customerRma.TaxNo               = GetReaderValue_Int32(reader, "TaxNo", 0);                            //From: [Table]
                customerRma.TaxName             = GetReaderValue_String(reader, "TaxName", "");                        //From: [usp_select_Credit]
                customerRma.InvoiceDate         = GetReaderValue_DateTime(reader, "InvoiceDate", DateTime.MinValue);   //From: [usp_select_Credit]
                customerRma.Quantity            = GetReaderValue_NullableInt32(reader, "Quantity", null);              //From: [Table]
                customerRma.QuantityReceived    = GetReaderValue_NullableInt32(reader, "QuantityReceived", null);      //From: [usp_select_CustomerRMA]
                customerRma.IncotermName        = GetReaderValue_String(reader, "IncotermName", "");                   //From: [usp_select_Credit]
                customerRma.InvoiceCustomerPO   = GetReaderValue_String(reader, "InvoiceCustomerPO", "");              //From: [usp_select_CustomerRMA_for_NewCreditNote]
                customerRma.InvoiceShippingCost = GetReaderValue_NullableDouble(reader, "InvoiceShippingCost", null);  //From: [usp_select_CustomerRMA_for_NewCreditNote]
                customerRma.InvoiceFreight      = GetReaderValue_NullableDouble(reader, "InvoiceFreight", null);       //From: [usp_select_CustomerRMA_for_NewCreditNote]
                customerRma.Salesman2           = GetReaderValue_NullableInt32(reader, "Salesman2", null);             //From: [Table]
                customerRma.Salesman2Percent    = GetReaderValue_NullableDouble(reader, "Salesman2Percent", null);     //From: [Table]
                customerRma.CompanyTelephone    = GetReaderValue_String(reader, "CompanyTelephone", "");               //From: [usp_select_Credit_for_Print]
                customerRma.CompanyFax          = GetReaderValue_String(reader, "CompanyFax", "");                     //From: [usp_select_Credit_for_Print]
                customerRma.CustomerPO          = GetReaderValue_String(reader, "CustomerPO", "");                     //From: [Table]
                customerRma.TermsName           = GetReaderValue_String(reader, "TermsName", "");                      //From: [usp_select_CustomerRMA_for_Print]
                customerRma.ContactEmail        = GetReaderValue_String(reader, "ContactEmail", "");                   //From: [usp_select_Credit_for_Print]
            }
            return(customerRma);
        }
예제 #4
0
 /// <summary>
 /// GetForNewCreditNote
 /// Calls [usp_select_CustomerRMA_for_NewCreditNote]
 /// </summary>
 public static CustomerRma GetForNewCreditNote(System.Int32?customerRmaId)
 {
     Rebound.GlobalTrader.DAL.CustomerRmaDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.CustomerRma.GetForNewCreditNote(customerRmaId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         CustomerRma obj = new CustomerRma();
         obj.CustomerRMAId     = objDetails.CustomerRMAId;
         obj.ClientNo          = objDetails.ClientNo;
         obj.CustomerRMANumber = objDetails.CustomerRMANumber;
         obj.InvoiceNo         = objDetails.InvoiceNo;
         obj.AuthorisedBy      = objDetails.AuthorisedBy;
         obj.CustomerRMADate   = objDetails.CustomerRMADate;
         obj.Instructions      = objDetails.Instructions;
         obj.WarehouseNo       = objDetails.WarehouseNo;
         obj.CompanyNo         = objDetails.CompanyNo;
         obj.ContactNo         = objDetails.ContactNo;
         obj.DivisionNo        = objDetails.DivisionNo;
         obj.UpdatedBy         = objDetails.UpdatedBy;
         obj.DLUP                = objDetails.DLUP;
         obj.InvoiceNumber       = objDetails.InvoiceNumber;
         obj.AuthoriserName      = objDetails.AuthoriserName;
         obj.WarehouseName       = objDetails.WarehouseName;
         obj.CompanyName         = objDetails.CompanyName;
         obj.ContactName         = objDetails.ContactName;
         obj.DivisionName        = objDetails.DivisionName;
         obj.SalesOrderNo        = objDetails.SalesOrderNo;
         obj.SalesOrderNumber    = objDetails.SalesOrderNumber;
         obj.CurrencyNo          = objDetails.CurrencyNo;
         obj.Salesman            = objDetails.Salesman;
         obj.CurrencyCode        = objDetails.CurrencyCode;
         obj.CurrencyDescription = objDetails.CurrencyDescription;
         obj.SalesmanName        = objDetails.SalesmanName;
         obj.TaxNo               = objDetails.TaxNo;
         obj.TaxName             = objDetails.TaxName;
         obj.InvoiceDate         = objDetails.InvoiceDate;
         obj.Quantity            = objDetails.Quantity;
         obj.QuantityReceived    = objDetails.QuantityReceived;
         obj.ShipViaNo           = objDetails.ShipViaNo;
         obj.ShipViaName         = objDetails.ShipViaName;
         obj.Account             = objDetails.Account;
         obj.InvoiceCustomerPO   = objDetails.InvoiceCustomerPO;
         obj.InvoiceShippingCost = objDetails.InvoiceShippingCost;
         obj.InvoiceFreight      = objDetails.InvoiceFreight;
         obj.Salesman2           = objDetails.Salesman2;
         obj.Salesman2Percent    = objDetails.Salesman2Percent;
         //[002] code start
         obj.IncotermNo = objDetails.IncotermNo;
         //[002] code end
         objDetails = null;
         return(obj);
     }
 }
예제 #5
0
 /// <summary>
 /// GetNextNumber
 /// Calls [usp_select_CustomerRMA_NextNumber]
 /// </summary>
 public static CustomerRma GetNextNumber(System.Int32?clientNo, System.Int32?updatedBy)
 {
     Rebound.GlobalTrader.DAL.CustomerRmaDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.CustomerRma.GetNextNumber(clientNo, updatedBy);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         CustomerRma obj = new CustomerRma();
         obj.CustomerRMANumber = objDetails.CustomerRMANumber;
         objDetails            = null;
         return(obj);
     }
 }