Esempio n. 1
0
        /// <summary>
        /// Empty data context is used when the from is loaded without ID (the from is in "insert mode")
        /// </summary>
        /// <param name="error"></param>
        /// <returns></returns>
        public OrderDetailsDataContext GetEmptyDataContext(out string error)
        {
            OrderDetailsDataContext dataContext = new OrderDetailsDataContext();

            error = null;
            dataContext.modelNotifiedForOrderDetailsMain = new ModelNotifiedForOrderDetails();


            return(dataContext);
        }
Esempio n. 2
0
        /// <summary>
        /// Empty data context is used when the from is loaded without ID (the from is in "insert mode")
        /// </summary>
        public OrderDetailsDataContext GetEmptyDataContext(out string error)
        {
            OrderDetailsDataContext dataContext = new OrderDetailsDataContext();

            error = null;
            dataContext.modelNotifiedForOrderDetailsMain = new ModelNotifiedForOrderDetails();;
            dataContext.modelNotifiedForOrders           = GetAll_Orders(out error);
            dataContext.modelNotifiedForProducts         = GetAll_Products(out error);
            return(dataContext);
        }
Esempio n. 3
0
        public OrderDetailsDataContext GetDataContext(int OrderID, int ProductID, out string error)
        {
            OrderDetailsDataContext dataContext = new OrderDetailsDataContext();

            error = null;
            dataContext.modelNotifiedForOrderDetailsMain = GetOrderDetailsByID(OrderID, ProductID, out error);
            dataContext.modelNotifiedForOrders           = GetAll_Orders(out error);
            dataContext.modelNotifiedForProducts         = GetAll_Products(out error);
            dataContext.PopulateComboBoxesItemSource();


            return(dataContext);
        }