Beispiel #1
0
 private void grid_IdNameItem_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         SupplierDBaccess SA = new SupplierDBaccess();
         Grid_ItemType.DataSource = SA.getSupplierItems(grid_IdNameItem.CurrentRow.Cells["sup_id"].Value.ToString());
         Grid_ItemType.ClearSelection();
     }
     catch (SqlException)
     {
         MetroMessageBox.Show(this, "\n\nConnecton Failed", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (FormatException)
     {
         MetroMessageBox.Show(this, "\n\nInvalid Format", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (OutOfMemoryException)
     {
         MetroMessageBox.Show(this, "\n\nInsuffisent memory", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (Exception)
     {
         MetroMessageBox.Show(this, "\n\nERROR", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #2
0
        private void ReportForm_Load(object sender, EventArgs e)
        {
            listpanel.Add(panel_Display);
            listpanel.Add(panel_SalesReport);
            listpanel.Add(panel_PurReport);
            listpanel.Add(panel_clientReport);
            listpanel.Add(panel_supReport);
            listpanel.Add(panel_stockProduct);
            listpanel.Add(panel_stockMaterials);
            //listpanel.Add(Panel_AppOdr);
            listpanel[index].BringToFront();
            listpanel[index = 0].BringToFront();

            fillSalesChart();
            fillPurChart();
            fillClientChart();
            fillProChart();
            fillMatChart();

            grid_Clientreport.ClearSelection();
            Grid_ItemType.ClearSelection();
            grid_met.ClearSelection();
            grid_product.ClearSelection();
            grid_PurReport.ClearSelection();
            grid_SaleReport.ClearSelection();
        }