Esempio n. 1
0
        private void cmdLoadData_Click(object sender, EventArgs e)
        {
            try
            {
                //add dealer
                //var dealer = new Dealer(0, DateTime.Now, DateTime.Now, 1, "Dealer A", "new", "address", 1, 1);
                //var outdeal = _dealerRepository.Add(dealer);

                //var dealer2 = new Dealer(0, DateTime.Now, DateTime.Now, 1, "Dealer B", "new", "address", 1, 1);
                //var outdeal2 = _dealerRepository.Add(dealer2);

                //var St_ser = new master_serialitem(0, "Stock Ser A", "Stock Ser A");
                //var outdeal3 = _master_SerialitemRepository.Add(St_ser);

                //var St_ser2 = new master_serialitem(0, "Stock Ser B", "Stock Ser B");
                //var outdeal4 = _master_SerialitemRepository.Add(St_ser2);

                //var mast_stk = new Master_Stock(0, "Stock A", "newA", "stock detao", 0, 100);
                //var outdeal5 = _master_StockRepository.Add(mast_stk);

                //var mast_stkB = new Master_Stock(0, "Stock B", "newA", "stock detao", 0, 100);
                //var outdeal6 = _master_StockRepository.Add(mast_stkB);

                var Dealer_list = _dealerQueries.GetDealers().Result;
                var serial_list = _master_SerialItemQueries.GetMaster_StockItems().Result;
                var stock_list  = _master_StockQueries.GetMaster_StockItems().Result;


                var trans_stock = new Stock_Transaction(0, DateTime.Now, DateTime.Now, 100, DateTime.Now, 9, 10, 0, 0, 2, 1, 2, "notes");

                var outdeal  = _stock_TransRepository.Add(trans_stock);
                var outdeal2 = _stock_TransRepository.FindAsync(19).Result;
                var repo     = stock_TransQueries.GetStock_Tran_list().Result;
                //txtData.Text = $" {repo.FirstOrDefault().stock_name}    :    {repo.FirstOrDefault().stock_detail} ";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 2
0
        private void Load_Grid()
        {
            var stock_list = _master_StockQueries.GetMaster_StockItems().Result;

            dg_stockGrid.DataSource = stock_list;
        }