Ejemplo n.º 1
0
 private void ListFilteredStock()
 {
     try
     {
         pnlList.Visible = true;
         grdList.Visible = true;
         grdList.Rows.Clear();
         StockReconcolitationDB      sdb       = new StockReconcolitationDB();
         List <stockreconcolitation> stockList = StockReconcolitationDB.GetStockReconcolitationList();
         foreach (stockreconcolitation st in stockList)
         {
             grdList.Rows.Add();
             grdList.Rows[grdList.RowCount - 1].Cells["StockItemID"].Value   = st.StockItemID;
             grdList.Rows[grdList.RowCount - 1].Cells["StockItemName"].Value = st.StockItemName;
             grdList.Rows[grdList.RowCount - 1].Cells["Reciept"].Value       = st.Reciept;
             grdList.Rows[grdList.RowCount - 1].Cells["Issue"].Value         = st.Issue;
             grdList.Rows[grdList.RowCount - 1].Cells["Balance"].Value       = st.PresentStock;
         }
         if (grdList.RowCount > 0)
         {
             txtSearch.Visible        = true;
             lblSearch.Visible        = true;
             btnExportToExcel.Visible = true;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error in Stock listing");
     }
 }