コード例 #1
0
        /// <summary>
        /// Returns a new CustomerRmaLineDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual CustomerRmaLineDetails GetCustomerRmaLineFromReader(DbDataReader reader)
        {
            CustomerRmaLineDetails customerRmaLine = new CustomerRmaLineDetails();

            if (reader.HasRows)
            {
                customerRmaLine.CustomerRMALineId = GetReaderValue_Int32(reader, "CustomerRMALineId", 0);                        //From: [Table]
                customerRmaLine.CustomerRMANo     = GetReaderValue_Int32(reader, "CustomerRMANo", 0);                            //From: [Table]
                customerRmaLine.InvoiceLineNo     = GetReaderValue_Int32(reader, "InvoiceLineNo", 0);                            //From: [Table]
                customerRmaLine.ReturnDate        = GetReaderValue_NullableDateTime(reader, "ReturnDate", null);                 //From: [Table]
                customerRmaLine.Reason            = GetReaderValue_String(reader, "Reason", "");                                 //From: [Table]
                customerRmaLine.Quantity          = GetReaderValue_NullableInt32(reader, "Quantity", null);                      //From: [usp_select_CustomerRMA]
                customerRmaLine.Notes             = GetReaderValue_String(reader, "Notes", "");                                  //From: [Table]
                customerRmaLine.UpdatedBy         = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);                     //From: [Table]
                customerRmaLine.DLUP                    = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);            //From: [Table]
                customerRmaLine.CustomerRMAId           = GetReaderValue_Int32(reader, "CustomerRMAId", 0);                      //From: [Table]
                customerRmaLine.CustomerRMANumber       = GetReaderValue_Int32(reader, "CustomerRMANumber", 0);                  //From: [Table]
                customerRmaLine.CustomerRMADate         = GetReaderValue_DateTime(reader, "CustomerRMADate", DateTime.MinValue); //From: [Table]
                customerRmaLine.CompanyName             = GetReaderValue_String(reader, "CompanyName", "");                      //From: [usp_itemsearch_CustomerRMA]
                customerRmaLine.CompanyNo               = GetReaderValue_Int32(reader, "CompanyNo", 0);                          //From: [Table]
                customerRmaLine.InvoiceNumber           = GetReaderValue_Int32(reader, "InvoiceNumber", 0);                      //From: [usp_itemsearch_CustomerRMA]
                customerRmaLine.InvoiceNo               = GetReaderValue_NullableInt32(reader, "InvoiceNo", null);               //From: [Table]
                customerRmaLine.ROHS                    = GetReaderValue_Byte(reader, "ROHS", (byte)0);                          //From: [usp_datalistnugget_CustomerRMALine]
                customerRmaLine.Part                    = GetReaderValue_String(reader, "Part", "");                             //From: [usp_datalistnugget_CustomerRMALine]
                customerRmaLine.ContactName             = GetReaderValue_String(reader, "ContactName", "");                      //From: [usp_select_CustomerRMA]
                customerRmaLine.ContactNo               = GetReaderValue_NullableInt32(reader, "ContactNo", null);               //From: [Table]
                customerRmaLine.ManufacturerNo          = GetReaderValue_NullableInt32(reader, "ManufacturerNo", null);          //From: [usp_datalistnugget_CustomerRMALine]
                customerRmaLine.ManufacturerCode        = GetReaderValue_String(reader, "ManufacturerCode", "");                 //From: [usp_datalistnugget_CustomerRMALine]
                customerRmaLine.RowCnt                  = GetReaderValue_NullableInt32(reader, "RowCnt", null);                  //From: [usp_itemsearch_CustomerRMA]
                customerRmaLine.QuantityReceived        = GetReaderValue_NullableInt32(reader, "QuantityReceived", null);        //From: [usp_select_CustomerRMA]
                customerRmaLine.SalesmanName            = GetReaderValue_String(reader, "SalesmanName", "");                     //From: [usp_itemsearch_CustomerRMA]
                customerRmaLine.ClientNo                = GetReaderValue_Int32(reader, "ClientNo", 0);                           //From: [Table]
                customerRmaLine.InvoiceDate             = GetReaderValue_DateTime(reader, "InvoiceDate", DateTime.MinValue);     //From: [usp_select_CustomerRMA]
                customerRmaLine.CurrencyNo              = GetReaderValue_Int32(reader, "CurrencyNo", 0);                         //From: [usp_select_CustomerRMA]
                customerRmaLine.Salesman                = GetReaderValue_Int32(reader, "Salesman", 0);                           //From: [usp_select_CustomerRMA]
                customerRmaLine.DivisionNo              = GetReaderValue_NullableInt32(reader, "DivisionNo", null);              //From: [Table]
                customerRmaLine.TeamNo                  = GetReaderValue_NullableInt32(reader, "TeamNo", null);                  //From: [usp_select_CustomerRMALine]
                customerRmaLine.QuantityAllocated       = GetReaderValue_NullableInt32(reader, "QuantityAllocated", null);       //From: [usp_select_CustomerRMALine]
                customerRmaLine.ProductNo               = GetReaderValue_NullableInt32(reader, "ProductNo", null);               //From: [usp_select_CustomerRMALine]
                customerRmaLine.ProductName             = GetReaderValue_String(reader, "ProductName", "");                      //From: [usp_select_CustomerRMALine]
                customerRmaLine.ProductDescription      = GetReaderValue_String(reader, "ProductDescription", "");               //From: [usp_select_CustomerRMALine]
                customerRmaLine.ProductDutyCode         = GetReaderValue_String(reader, "ProductDutyCode", "");                  //From: [usp_select_CustomerRMALine]
                customerRmaLine.FullPart                = GetReaderValue_String(reader, "FullPart", "");                         //From: [usp_select_CustomerRMALine]
                customerRmaLine.CustomerPart            = GetReaderValue_String(reader, "CustomerPart", "");                     //From: [usp_select_CustomerRMALine]
                customerRmaLine.ManufacturerName        = GetReaderValue_String(reader, "ManufacturerName", "");                 //From: [usp_select_CustomerRMALine]
                customerRmaLine.PackageNo               = GetReaderValue_NullableInt32(reader, "PackageNo", null);               //From: [usp_select_CustomerRMALine]
                customerRmaLine.DateCode                = GetReaderValue_String(reader, "DateCode", "");                         //From: [usp_select_CustomerRMALine]
                customerRmaLine.PackageName             = GetReaderValue_String(reader, "PackageName", "");                      //From: [usp_select_CustomerRMALine]
                customerRmaLine.PackageDescription      = GetReaderValue_String(reader, "PackageDescription", "");               //From: [usp_select_CustomerRMALine]
                customerRmaLine.Price                   = GetReaderValue_NullableDouble(reader, "Price", null);                  //From: [usp_select_CustomerRMALine]
                customerRmaLine.LandedCost              = GetReaderValue_NullableDouble(reader, "LandedCost", null);             //From: [usp_select_CustomerRMALine]
                customerRmaLine.LineNotes               = GetReaderValue_String(reader, "LineNotes", "");                        //From: [usp_select_CustomerRMALine]
                customerRmaLine.InvoiceLineAllocationId = GetReaderValue_Int32(reader, "InvoiceLineAllocationId", 0);            //From: [usp_select_CustomerRMALine_for_Receiving]


                // [001] code start
                customerRmaLine.QuantityShipped = GetReaderValue_NullableInt32(reader, "QuantityShipped", null);         //From: [usp_select_CustomerRMA]
                customerRmaLine.QuantityCRMA    = GetReaderValue_NullableInt32(reader, "QuantityAllocatedToCRMA", null); // from: [usp_select_CustomerRMA]

                customerRmaLine.Closed = GetReaderValue_Boolean(reader, "Closed", false);                                //From: [Table]

                // [001] code end
            }
            return(customerRmaLine);
        }
コード例 #2
0
ファイル: CustomerRmaLine.cs プロジェクト: vinay1988/Ang6API
 /// <summary>
 /// GetForReceiving
 /// Calls [usp_select_CustomerRMALine_for_Receiving]
 /// </summary>
 public static CustomerRmaLine GetForReceiving(System.Int32?customerRmaLineNo)
 {
     Rebound.GlobalTrader.DAL.CustomerRmaLineDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.CustomerRmaLine.GetForReceiving(customerRmaLineNo);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         CustomerRmaLine obj = new CustomerRmaLine();
         obj.CustomerRMAId      = objDetails.CustomerRMAId;
         obj.CustomerRMANumber  = objDetails.CustomerRMANumber;
         obj.CustomerRMALineId  = objDetails.CustomerRMALineId;
         obj.CustomerRMADate    = objDetails.CustomerRMADate;
         obj.ReturnDate         = objDetails.ReturnDate;
         obj.ClientNo           = objDetails.ClientNo;
         obj.Notes              = objDetails.Notes;
         obj.Reason             = objDetails.Reason;
         obj.InvoiceNumber      = objDetails.InvoiceNumber;
         obj.InvoiceDate        = objDetails.InvoiceDate;
         obj.InvoiceNo          = objDetails.InvoiceNo;
         obj.InvoiceLineNo      = objDetails.InvoiceLineNo;
         obj.CurrencyNo         = objDetails.CurrencyNo;
         obj.Salesman           = objDetails.Salesman;
         obj.SalesmanName       = objDetails.SalesmanName;
         obj.DivisionNo         = objDetails.DivisionNo;
         obj.TeamNo             = objDetails.TeamNo;
         obj.CompanyNo          = objDetails.CompanyNo;
         obj.CompanyName        = objDetails.CompanyName;
         obj.ContactNo          = objDetails.ContactNo;
         obj.ContactName        = objDetails.ContactName;
         obj.Quantity           = objDetails.Quantity;
         obj.QuantityReceived   = objDetails.QuantityReceived;
         obj.QuantityAllocated  = objDetails.QuantityAllocated;
         obj.ProductNo          = objDetails.ProductNo;
         obj.ProductName        = objDetails.ProductName;
         obj.ProductDescription = objDetails.ProductDescription;
         obj.ProductDutyCode    = objDetails.ProductDutyCode;
         obj.FullPart           = objDetails.FullPart;
         obj.Part                    = objDetails.Part;
         obj.CustomerPart            = objDetails.CustomerPart;
         obj.ROHS                    = objDetails.ROHS;
         obj.ManufacturerNo          = objDetails.ManufacturerNo;
         obj.ManufacturerName        = objDetails.ManufacturerName;
         obj.ManufacturerCode        = objDetails.ManufacturerCode;
         obj.PackageNo               = objDetails.PackageNo;
         obj.DateCode                = objDetails.DateCode;
         obj.PackageName             = objDetails.PackageName;
         obj.PackageDescription      = objDetails.PackageDescription;
         obj.Price                   = objDetails.Price;
         obj.LandedCost              = objDetails.LandedCost;
         obj.LineNotes               = objDetails.LineNotes;
         obj.InvoiceLineAllocationId = objDetails.InvoiceLineAllocationId;
         obj.QuantityAllocated       = objDetails.QuantityAllocated;
         obj.Reason1                 = objDetails.Reason1;
         obj.Reason2                 = objDetails.Reason2;
         obj.Reason1Val              = objDetails.Reason1Val;
         obj.Reason2Val              = objDetails.Reason2Val;
         obj.RootCause               = objDetails.RootCause;
         objDetails                  = null;
         return(obj);
     }
 }