예제 #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
        public void bindUpdateIncomesForm(DataRowView incomesRow, CarIncomes carIncomes)
        {
            CarIncomeUpdate objForm = new CarIncomeUpdate(Convert.ToInt16(incomesRow[0].ToString()), carIncomes, xtraTabControlCarsContent);

            objForm.TopLevel = false;
            XtraTabPage xtraTabPage = getTabPage("تعديل إيراد");

            if (xtraTabPage == null)
            {
                xtraTabControlCarsContent.TabPages.Add("تعديل إيراد");
                xtraTabPage = getTabPage("تعديل إيراد");
            }
            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
        //car Incomes
        public void bindRecordIncomesForm(CarIncomes carIncomes)
        {
            CarIncomeRecord objForm = new CarIncomeRecord(carIncomes, xtraTabControlCarsContent);

            objForm.TopLevel = false;
            XtraTabPage xtraTabPage = getTabPage("تسجيل إيراد");

            if (xtraTabPage == null)
            {
                xtraTabControlCarsContent.TabPages.Add("تسجيل إيراد");
                xtraTabPage = getTabPage("تسجيل إيراد");
            }
            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
 private void BtnCarIncomes_Click(object sender, EventArgs e)
 {
     try
     {
         tableLayoutPanelContent.Controls.Clear();
         resetButtonsStoreDetailsPanelStyle();
         Button btn = (Button)sender;
         btn.ForeColor = Color.Black;
         btn.BackColor = Color.White;
         CarIncomes objForm = new CarIncomes();
         objForm.TopLevel = false;
         tableLayoutPanelContent.Controls.Add(objForm);
         objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         objForm.Dock            = DockStyle.Fill;
         objForm.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #6
0
        //CarsManagment
        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("الأ يرادات");
                if (xtraTabPage == null)
                {
                    xtraTabControlCarsContent.TabPages.Add("الأ يرادات");
                    xtraTabPage = getTabPage("الأ يرادات");
                }

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