Ejemplo n.º 1
0
        private void navBarItemSupplierTaswyaReport_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            try
            {
                restForeColorOfNavBarItem();
                NavBarItem navBarItem = (NavBarItem)sender;
                navBarItem.Appearance.ForeColor = Color.Blue;
                if (!xtraTabControlPurchases.Visible)
                {
                    xtraTabControlPurchases.Visible = true;
                }

                XtraTabPage xtraTabPage = getTabPage(xtraTabControlPurchases, "عرض التسويات");
                if (xtraTabPage == null)
                {
                    xtraTabControlPurchases.TabPages.Add("عرض التسويات");
                    xtraTabPage = getTabPage(xtraTabControlPurchases, "عرض التسويات");
                }

                xtraTabPage.Controls.Clear();
                xtraTabControlPurchases.SelectedTabPage = xtraTabPage;

                SupplierTaswayaReport objForm = new SupplierTaswayaReport(this, xtraTabControlPurchases);

                objForm.TopLevel = false;
                xtraTabPage.Controls.Add(objForm);
                objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                objForm.Dock            = DockStyle.Fill;
                objForm.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
 public UpdateSupplierTaswaya(DataRowView row1, SupplierTaswayaReport supplierTaswayaReport, XtraTabControl xtraTabControl)
 {
     try
     {
         InitializeComponent();
         dbconnection  = new MySqlConnection(connection.connectionString);
         dbconnection1 = new MySqlConnection(connection.connectionString);
         dbconnection.Open();
         this.row1 = row1;
         this.supplierTaswayaReport = supplierTaswayaReport;
         this.xtraTabControl        = xtraTabControl;
         string           query = "select * from supplier";
         MySqlDataAdapter da    = new MySqlDataAdapter(query, dbconnection);
         DataTable        dt    = new DataTable();
         da.Fill(dt);
         comSupplier.DataSource    = dt;
         comSupplier.DisplayMember = dt.Columns["Supplier_Name"].ToString();
         comSupplier.ValueMember   = dt.Columns["Supplier_ID"].ToString();
         comSupplier.Text          = "";
         setData();
         loaded = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     dbconnection.Close();
 }
Ejemplo n.º 3
0
        public void bindUpdateTaswayaSupplierForm(DataRowView row, SupplierTaswayaReport SupplierTaswayaReport)
        {
            if (!xtraTabControlPurchases.Visible)
            {
                xtraTabControlPurchases.Visible = true;
            }

            XtraTabPage xtraTabPage = getTabPage(xtraTabControlPurchases, "تعديل تسوية مورد");

            if (xtraTabPage == null)
            {
                xtraTabControlPurchases.TabPages.Add("تعديل تسوية مورد");
                xtraTabPage = getTabPage(xtraTabControlPurchases, "تعديل تسوية مورد");
            }
            xtraTabPage.Controls.Clear();
            xtraTabControlPurchases.SelectedTabPage = xtraTabPage;

            UpdateSupplierTaswaya objForm = new UpdateSupplierTaswaya(row, SupplierTaswayaReport, xtraTabControlPurchases);

            objForm.TopLevel = false;
            xtraTabPage.Controls.Add(objForm);
            objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            objForm.Dock            = DockStyle.Fill;
            objForm.Show();
        }