Exemplo n.º 1
0
        private void feedLedger(GrnItems _item) {
            try {

                StockLedger _ledger = new StockLedger();
                _ledger.ItemCode = _item.ItemCode;
                _ledger.ItemType = "";
                _ledger.TransactionBy = "Admin";
                _ledger.TransactionTime = DateTime.Now;
                _ledger.TransactionType = "GRN";
                _ledger.DocNo = _item.GRNID;
                _ledger.GetTransactionID();
                
                
                _ledger.FeedLedger(_ledger);
            }
            catch (Exception ex) {

            }
        }
Exemplo n.º 2
0
        void getPoItem(string ID)
        {
            try
            {
               
                foreach (var item in getPoItemsID(ID))
                {

                    GrnItems gItems = new GrnItems();
                    gItems.GRNID = txtGrnNo.Text;
                    gItems.ItemCode = item.ItemCode;
                    gItems.Description = item.Description;
                    gItems.Color = item.Colors;
                    gItems.Width = item.Width;
                    gItems.Unit = item.Unit;
                    gItems.Qty = item.Qty;
                    gItems.ReceivedQty = item.Qty;
                    gItems.UnitPrice = item.Price;
                    gItems.waistadeQty = 0;
                    gItems.LineDiscount = 0;
                    gItems.SubTotal = item.SubTotal;


                    
                    lstGrnItems.Add(gItems);
                    
                }

                feedGrnItems();


            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error - B-0008", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        
        
        
        }
Exemplo n.º 3
0
         private void addGrnItems()
         {
             try
             {
                 GenaricRepository<GrnItems> _GrnItemsRepo = new GenaricRepository<GrnItems>(new ItrackContext());
                 GrnItems _grnitems = new GrnItems();

                 foreach (var item in lstGrnItems)
                 {
                     _grnitems.ItemCode = item.ItemCode;
                     _grnitems.Description = item.Description;
                     _grnitems.Color = item.Color;
                     _grnitems.Width = item.Width;
                     _grnitems.Unit = item.Unit;
                     _grnitems.Qty = item.Qty;
                     _grnitems.ReceivedQty = item.ReceivedQty;
                     _grnitems.UnitPrice = item.UnitPrice;
                     _grnitems.ReceivedPrice = item.ReceivedPrice;
                     _grnitems.LineDiscount = item.LineDiscount;
                     _grnitems.waistadeQty = item.waistadeQty;
                     _grnitems.SubTotal = item.SubTotal;
                     _grnitems.GRNID = txtGrnNo.Text;
                     _GrnItemsRepo.Add(_grnitems);
                      feedLedger(_grnitems);
                 }

                 
            }
            catch(Exception ex){
                Debug.WriteLine(ex.Message);
            }
             

         }