Exemple #1
0
 public CarExpensesRecord(CarExpenses carExpenses, XtraTabControl xtraTabControlCarsContent)
 {
     try
     {
         InitializeComponent();
         dbconnection = new MySqlConnection(connection.connectionString);
         this.xtraTabControlCarsContent = xtraTabControlCarsContent;
         this.carExpenses = carExpenses;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 public CarExpensesUpdate(DataRowView r, CarExpenses CarExpenses, XtraTabControl xtraTabControlCarsContent)
 {
     try
     {
         InitializeComponent();
         dbconnection = new MySqlConnection(connection.connectionString);
         row          = r;
         this.xtraTabControlCarsContent = xtraTabControlCarsContent;
         this.CarExpenses = CarExpenses;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemple #3
0
        public void bindUpdateExpensesForm(DataRowView ExpensesRow, CarExpenses carExpenses)
        {
            CarExpensesUpdate objForm = new CarExpensesUpdate(ExpensesRow, carExpenses, xtraTabControlCarsContent);

            objForm.TopLevel = false;
            XtraTabPage xtraTabPage = getTabPage(xtraTabControlCarsContent, "تعديل مصروف");

            if (xtraTabPage == null)
            {
                xtraTabControlCarsContent.TabPages.Add("تعديل مصروف");
                xtraTabPage = getTabPage(xtraTabControlCarsContent, "تعديل مصروف");
            }
            xtraTabPage.Controls.Clear();
            xtraTabPage.Controls.Add(objForm);
            xtraTabControlCarsContent.SelectedTabPage = xtraTabPage;

            objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            objForm.Dock            = DockStyle.Fill;
            objForm.Show();
        }
Exemple #4
0
        //car expenses
        private void navBarItem6_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            try
            {
                restForeColorOfNavBarItem();
                NavBarItem navBarItem = (NavBarItem)sender;
                navBarItem.Appearance.ForeColor = Color.Blue;
                if (!xtraTabControlCarsContent.Visible)
                {
                    xtraTabControlCarsContent.Visible = true;
                }

                XtraTabPage xtraTabPage = getTabPage(xtraTabControlCarsContent, "المصروفات");
                if (xtraTabPage == null)
                {
                    xtraTabControlCarsContent.TabPages.Add("المصروفات");
                    xtraTabPage = getTabPage(xtraTabControlCarsContent, "المصروفات");
                }

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

                CarExpenses objForm = new CarExpenses(this);

                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);
            }
        }