Пример #1
0
 /// <summary>
 /// Get
 /// Calls [usp_select_StockLog]
 /// </summary>
 public static StockLog Get(System.Int32?stockLogId)
 {
     Rebound.GlobalTrader.DAL.StockLogDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.StockLog.Get(stockLogId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         StockLog obj = new StockLog();
         obj.StockLogId       = objDetails.StockLogId;
         obj.StockLogTypeNo   = objDetails.StockLogTypeNo;
         obj.StockNo          = objDetails.StockNo;
         obj.QuantityInStock  = objDetails.QuantityInStock;
         obj.QuantityOnOrder  = objDetails.QuantityOnOrder;
         obj.InvoiceNo        = objDetails.InvoiceNo;
         obj.PurchaseOrderNo  = objDetails.PurchaseOrderNo;
         obj.RelatedStockNo   = objDetails.RelatedStockNo;
         obj.ActionQuantity   = objDetails.ActionQuantity;
         obj.GoodsInNo        = objDetails.GoodsInNo;
         obj.GoodsInLineNo    = objDetails.GoodsInLineNo;
         obj.CRMALineNo       = objDetails.CRMALineNo;
         obj.SalesOrderNo     = objDetails.SalesOrderNo;
         obj.SalesOrderLineNo = objDetails.SalesOrderLineNo;
         obj.SRMALineNo       = objDetails.SRMALineNo;
         obj.UpdatedBy        = objDetails.UpdatedBy;
         obj.DLUP             = objDetails.DLUP;
         obj.Detail           = objDetails.Detail;
         obj.ChangeNotes      = objDetails.ChangeNotes;
         obj.StockLogReasonNo = objDetails.StockLogReasonNo;
         obj.DebitNo          = objDetails.DebitNo;
         objDetails           = null;
         return(obj);
     }
 }
Пример #2
0
        /// <summary>
        /// Returns a new StockLogDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual StockLogDetails GetStockLogFromReader(DbDataReader reader)
        {
            StockLogDetails stockLog = new StockLogDetails();

            if (reader.HasRows)
            {
                stockLog.StockLogId          = GetReaderValue_Int32(reader, "StockLogId", 0);                     //From: [Table]
                stockLog.StockLogTypeNo      = GetReaderValue_Int32(reader, "StockLogTypeNo", 0);                 //From: [Table]
                stockLog.StockNo             = GetReaderValue_Int32(reader, "StockNo", 0);                        //From: [Table]
                stockLog.QuantityInStock     = GetReaderValue_Int32(reader, "QuantityInStock", 0);                //From: [usp_selectAll_Allocation]
                stockLog.QuantityOnOrder     = GetReaderValue_Int32(reader, "QuantityOnOrder", 0);                //From: [usp_selectAll_Allocation_for_SalesOrderLine]
                stockLog.InvoiceNo           = GetReaderValue_NullableInt32(reader, "InvoiceNo", null);           //From: [Table]
                stockLog.PurchaseOrderNo     = GetReaderValue_NullableInt32(reader, "PurchaseOrderNo", null);     //From: [usp_selectAll_Allocation]
                stockLog.RelatedStockNo      = GetReaderValue_NullableInt32(reader, "RelatedStockNo", null);      //From: [Table]
                stockLog.ActionQuantity      = GetReaderValue_NullableInt32(reader, "ActionQuantity", null);      //From: [Table]
                stockLog.GoodsInNo           = GetReaderValue_NullableInt32(reader, "GoodsInNo", null);           //From: [Table]
                stockLog.GoodsInLineNo       = GetReaderValue_NullableInt32(reader, "GoodsInLineNo", null);       //From: [usp_selectAll_Allocation]
                stockLog.CRMALineNo          = GetReaderValue_NullableInt32(reader, "CRMALineNo", null);          //From: [Table]
                stockLog.SalesOrderNo        = GetReaderValue_NullableInt32(reader, "SalesOrderNo", null);        //From: [usp_selectAll_Allocation]
                stockLog.SalesOrderLineNo    = GetReaderValue_NullableInt32(reader, "SalesOrderLineNo", null);    //From: [Table]
                stockLog.SRMALineNo          = GetReaderValue_NullableInt32(reader, "SRMALineNo", null);          //From: [Table]
                stockLog.UpdatedBy           = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);           //From: [Table]
                stockLog.DLUP                = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);        //From: [Table]
                stockLog.Detail              = GetReaderValue_String(reader, "Detail", "");                       //From: [Table]
                stockLog.ChangeNotes         = GetReaderValue_String(reader, "ChangeNotes", "");                  //From: [Table]
                stockLog.StockLogReasonNo    = GetReaderValue_NullableInt32(reader, "StockLogReasonNo", null);    //From: [usp_select_Stock]
                stockLog.DebitNo             = GetReaderValue_NullableInt32(reader, "DebitNo", null);             //From: [Table]
                stockLog.StockLogReasonName  = GetReaderValue_String(reader, "StockLogReasonName", "");           //From: [usp_selectAll_StockLog_for_Stock]
                stockLog.InvoiceNumber       = GetReaderValue_NullableInt32(reader, "InvoiceNumber", null);       //From: [usp_select_Credit]
                stockLog.PurchaseOrderNumber = GetReaderValue_NullableInt32(reader, "PurchaseOrderNumber", null); //From: [usp_selectAll_Allocation]
                stockLog.RelatedStockPart    = GetReaderValue_String(reader, "RelatedStockPart", "");             //From: [usp_selectAll_StockLog_for_Stock]
                stockLog.UpdatedByName       = GetReaderValue_String(reader, "UpdatedByName", "");                //From: [usp_selectAll_StockLog_for_Stock]
                stockLog.GoodsInNumber       = GetReaderValue_NullableInt32(reader, "GoodsInNumber", null);       //From: [Table]
                stockLog.SalesOrderNumber    = GetReaderValue_NullableInt32(reader, "SalesOrderNumber", null);    //From: [usp_selectAll_Allocation]
                stockLog.CustomerRMANo       = GetReaderValue_NullableInt32(reader, "CustomerRMANo", null);       //From: [usp_selectAll_Allocation_for_SalesOrderLine]
                stockLog.CustomerRMANumber   = GetReaderValue_NullableInt32(reader, "CustomerRMANumber", null);   //From: [usp_selectAll_Allocation_for_SalesOrderLine]
                stockLog.SupplierRMANo       = GetReaderValue_NullableInt32(reader, "SupplierRMANo", null);       //From: [usp_selectAll_Allocation]
                stockLog.SupplierRMANumber   = GetReaderValue_NullableInt32(reader, "SupplierRMANumber", null);   //From: [usp_selectAll_Allocation]
                stockLog.DebitNumber         = GetReaderValue_NullableInt32(reader, "DebitNumber", null);         //From: [Table]
                stockLog.GoodsInCurrencyCode = GetReaderValue_String(reader, "GoodsInCurrencyCode", "");          //From: [usp_selectAll_StockLog_for_Stock]
            }
            return(stockLog);
        }