예제 #1
0
 public CarIncomeRecord(CarIncomes carIncomes, XtraTabControl xtraTabControlCarsContent)
 {
     try
     {
         InitializeComponent();
         dbconnection    = new MySqlConnection(connection.connectionString);
         this.carIncomes = carIncomes;
         this.xtraTabControlCarsContent = xtraTabControlCarsContent;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #2
0
 public CarIncomeUpdate(int id, CarIncomes carIncomes, XtraTabControl xtraTabControlCarsContent)
 {
     try
     {
         ID = id;
         this.carIncomes = carIncomes;
         this.xtraTabControlCarsContent = xtraTabControlCarsContent;
         InitializeComponent();
         dbconnection = new MySqlConnection(connection.connectionString);
         data         = new List <string>();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #3
0
        //car Incomes
        public void bindRecordIncomesForm(CarIncomes carIncomes)
        {
            CarIncomeRecord objForm = new CarIncomeRecord(carIncomes, 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();
        }
예제 #4
0
        public void bindUpdateIncomesForm(DataRowView incomesRow, CarIncomes carIncomes)
        {
            CarIncomeUpdate objForm = new CarIncomeUpdate(Convert.ToInt32(incomesRow[0].ToString()), carIncomes, 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();
        }
예제 #5
0
        //TaxesSystem
        private void navBarItem4_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;

                CarIncomes objForm = new CarIncomes(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);
            }
        }