コード例 #1
0
        public ListProductViewModel() : base()
        {
            listProductModel = ListProductModel.GetInstance();
            listProductModel.LoadAllProduct();
            //listDetailBill = ListDetailBillModel.GetInstance();
            listDetailBill = new ListDetailBillModel();

            // command init
            ProductSelectionChangeCommand = new DelegateCommand <ProductModel>(SelectedProductChange);
            ShortcutKeysCommand           = new DelegateCommand <string>(HandleShortcutKeys);
            CreateBillCommand             = new DelegateCommand(CreateBill);
            CheckoutBillCommand           = new DelegateCommand(CheckoutBill);
            PrintBillCommand             = new DelegateCommand(PrintBill);
            ClearBillCommand             = new DelegateCommand(ClearBill);
            CancelCommand                = new DelegateCommand(Cancel);
            DetailSelectionChangeCommand = new DelegateCommand <DetailBillItemViewModel>(SelectedDetailChange);
            RemoveItemCommand            = new DelegateCommand <DetailBillItemViewModel>(RemoveDetailItem);


            // =============> !!!! [WARNING] DO NOT DELETE THIS CODE !!!! <==============
            SelectedIndex = 0;
            SelectedIndex = -1;
            NotifyChanged("SelectedIndex");
            // ==================================> <======================================
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: hungnguyen00/PMQuanLy
 private void Form1_Load(object sender, EventArgs e)
 {
     mProduct   = new ListProductModel();
     mInventory = new InventoryModel();
     xtraTabControl1.SelectedTabPageIndex = 2;
     LoadDataOrder();
 }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: hungnguyen00/PMQuanLy2012
 private void Form1_Load(object sender, EventArgs e)
 {
     mProduct       = new ListProductModel();
     mInventory     = new InventoryModel();
     mOrder         = new OrderModel();
     mOrderDetail   = new OrderDetailModel();
     serviceAppCust = new ServiceCustomerControllerPortTypeClient();
     xtraTabControl1.SelectedTabPageIndex = 0;
     LoadDataProduct();
 }
コード例 #4
0
 private void ProductTypeChange(ProductTypeModel item)
 {
     if (item.ID == "LMH0")
     {
         ListProductModel.GetInstance().LoadAllProduct();
     }
     else
     {
         ListProductModel.GetInstance().LoadProductFromType(item.ID);
     }
 }
コード例 #5
0
        public ProductManagementViewModel() : base()
        {
            listProductModel = ListProductModel.GetInstance();
            listProductModel.LoadAllProduct();
            bufferList = new ObservableCollection <ProductModel>(listProductModel.List);

            SelectedProduct = new ProductModel();
            SelectedProduct = ListProduct[0];
            NotifyProductChange();

            fieldSearch = "Name";

            ProductSelectionChangeCommand = new DelegateCommand <ProductModel>(ProductChange);
            SearchTextChangeCommand       = new DelegateCommand <TextBox>(OnSearchTextChange);
            AddProductCommand             = new DelegateCommand(ShowAddProductDialog);
            UpdateProductCommand          = new DelegateCommand(UpdateProduct);
            RemoveProductCommand          = new DelegateCommand(RemoveProduct);
            OpenSearchFilterCommand       = new DelegateCommand(ShowSearchFilterDialog);
        }