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