コード例 #1
0
 public StockHeader(StockType.Types type, int terminalDestination)
 {
     TerminalCode= Terminal.Instance.Code;
     TerminalToCode = terminalDestination;
     Date = DateTime.Now.Date;
     Code = GetNextStockHeaderCode();
     StockTypeCode = (int)type;
     UserCode = User.GetCurrentUser().Code;
     UpdateStatus(EntityStatus.New);
 }
コード例 #2
0
        public CreateStockViewModel(StockType.Types stockType)
            : base(new CreateStockView())
        {
            _stockType = stockType;
            StockHeader = new StockHeader(_stockType, Terminal.Instance.Code);

            if (_stockType == StockType.Types.New)
            {
                ViewHeader = "Alta de Stock";
                OpenDeliveryDocumentSelectionView();
            }
            else
            {
                ViewHeader = "Baja de Stock";
                OpenReturnReasonSelectionView();
            }
        }
コード例 #3
0
 /// <summary>
 /// Create a new StockType object.
 /// </summary>
 /// <param name="code">Initial value of the Code property.</param>
 public static StockType CreateStockType(global::System.Int32 code)
 {
     StockType stockType = new StockType();
     stockType.Code = code;
     return stockType;
 }
コード例 #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the StockTypes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToStockTypes(StockType stockType)
 {
     base.AddObject("StockTypes", stockType);
 }