private void UPDATE_DATA_GRID()
 {
     using (PUYO_WAREHOUSE_ALL_ENTITY db = new PUYO_WAREHOUSE_ALL_ENTITY())
     {
         DataPreview.DataSource = db.GET_PRODUCT_SALES_ALL(DateFromPicker.Value.Date, DateToPicker.Value.Date);
     }
 }
Exemple #2
0
 private void DATA_GRID_REPORT_UPDATE()
 {
     if (ReportCombo.Text.Equals("Product_Sales"))
     {
         using (PUYO_WAREHOUSE_ENTITY db = new PUYO_WAREHOUSE_ENTITY())
         {
             DisplayDataGrid.DataSource = db.GET_PRODUCT_SALES(Store_Combo.Text, DateFromPicker.Value.Date, DateToPicker.Value.Date);
             ReportTypeText.Text        = "Report Type: " + ReportCombo.Text + " For " + Store_Combo.Text;
         }
     }
     else if (ReportCombo.Text.Equals("Average_Sales"))
     {
         using (PUYO_WAREHOUSE_AVG_ENTITY db = new PUYO_WAREHOUSE_AVG_ENTITY())
         {
             DisplayDataGrid.DataSource = db.GET_AVERAGE_SALES_FORECAST(Store_Combo.Text, DateFromPicker.Value.Date, DateToPicker.Value.Date);
             ReportTypeText.Text        = "Report Type: " + ReportCombo.Text + " For " + Store_Combo.Text;
         }
     }
     else if (ReportCombo.Text.Equals("Product_Sales_All"))
     {
         using (PUYO_WAREHOUSE_ALL_ENTITY db = new PUYO_WAREHOUSE_ALL_ENTITY())
         {
             DisplayDataGrid.DataSource = db.GET_PRODUCT_SALES_ALL(DateFromPicker.Value.Date, DateToPicker.Value.Date);
             ReportTypeText.Text        = "Report Type: " + ReportCombo.Text;
         }
     }
     else if (ReportCombo.Text.Equals("Expired_Products"))
     {
         using (PUYO_WAREHOUSE_EXP_ENTITY db = new PUYO_WAREHOUSE_EXP_ENTITY())
         {
             DisplayDataGrid.DataSource = db.GET_EXPIRED_PRODUCTS(Store_Combo.Text, DateFromPicker.Value.Date, DateToPicker.Value.Date);
             ReportTypeText.Text        = "Report Type: " + ReportCombo.Text + " For " + Store_Combo.Text;
         }
     }
     else if (ReportCombo.Text.Equals("Expired_Products_All"))
     {
         using (PUYO_WAREHOUSE_EXP1_ALL_ENTITY db = new PUYO_WAREHOUSE_EXP1_ALL_ENTITY())
         {
             DisplayDataGrid.DataSource = db.GET_EXPIRED_PRODUCTS_ALL(DateFromPicker.Value.Date, DateToPicker.Value.Date);
             ReportTypeText.Text        = "Report Type: " + ReportCombo.Text;
         }
     }
     else if (ReportCombo.Text.Equals("Restocking_Single_Store"))
     {
         using (PUYO_WAREHOUSE_RESTOCK1_ENTITY db = new PUYO_WAREHOUSE_RESTOCK1_ENTITY())
         {
             DisplayDataGrid.DataSource = db.RESTOCKING(Store_Combo.Text, DateFromPicker.Value.Date, DateToPicker.Value.Date);
             ReportTypeText.Text        = "Report Type: " + ReportCombo.Text + " For " + Store_Combo.Text;
         }
     }
     else if (ReportCombo.Text.Equals("Restocking_All"))
     {
         using (PUYO_WAREHOUSE_RESTOCK1_ALL_ENTITY db = new PUYO_WAREHOUSE_RESTOCK1_ALL_ENTITY())
         {
             DisplayDataGrid.DataSource = db.RESTOCKING_ALL(DateFromPicker.Value.Date, DateToPicker.Value.Date);
             ReportTypeText.Text        = "Report Type: " + ReportCombo.Text;
         }
     }
 }