//Sets public void bindDisplaySetsForm(XtraTabPage xtraTabPage) { Ataqm objForm = new Ataqm(this); objForm.TopLevel = false; xtraTabPage.Controls.Add(objForm); objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; objForm.Dock = DockStyle.Fill; objForm.Show(); }
public SetRecord(Ataqm ataqm, XtraTabControl xtraTabControlStoresContent) { try { InitializeComponent(); this.ataqm = ataqm; this.xtraTabControlStoresContent = xtraTabControlStoresContent; dbconnection = new MySqlConnection(connection.connectionString); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public SetUpdate(DataRowView setRow, Ataqm ataqm, XtraTabControl xtraTabControlStoresContent) { try { InitializeComponent(); this.ataqm = ataqm; this.xtraTabControlStoresContent = xtraTabControlStoresContent; dbconnection = new MySqlConnection(connection.connectionString); this.updateRow = setRow; } catch (Exception ex) { MessageBox.Show(ex.Message); } dbconnection.Close(); }
public void bindUpdateSetForm(DataRowView prodRow, Ataqm ataqm) { SetUpdate objForm = new SetUpdate(prodRow, ataqm, xtraTabControlStoresContent); objForm.TopLevel = false; XtraTabPage xtraTabPage = getTabPage(xtraTabControlStoresContent, "تعديل طقم"); if (xtraTabPage == null) { xtraTabControlStoresContent.TabPages.Add("تعديل طقم"); xtraTabPage = getTabPage(xtraTabControlStoresContent, "تعديل طقم"); xtraTabPage.Controls.Clear(); xtraTabPage.Controls.Add(objForm); xtraTabControlStoresContent.SelectedTabPage = xtraTabPage; objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; objForm.Dock = DockStyle.Fill; objForm.Show(); } else if (xtraTabPage.ImageOptions.Image != null) { DialogResult dialogResult = MessageBox.Show("There is unsave data To you wound override it?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialogResult == DialogResult.Yes) { xtraTabPage.Controls.Clear(); xtraTabPage.Controls.Add(objForm); xtraTabControlStoresContent.SelectedTabPage = xtraTabPage; objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; objForm.Dock = DockStyle.Fill; objForm.Show(); } else if (dialogResult == DialogResult.No) { xtraTabControlStoresContent.SelectedTabPage = xtraTabPage; } } else { xtraTabPage.Controls.Clear(); xtraTabPage.Controls.Add(objForm); xtraTabControlStoresContent.SelectedTabPage = xtraTabPage; objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; objForm.Dock = DockStyle.Fill; objForm.Show(); } }
public void bindRecordSetForm(Ataqm ataqm) { SetRecord objForm = new SetRecord(ataqm, xtraTabControlStoresContent); objForm.TopLevel = false; XtraTabPage xtraTabPage = getTabPage(xtraTabControlStoresContent, "أضافة طقم"); if (xtraTabPage == null) { xtraTabControlStoresContent.TabPages.Add("أضافة طقم"); xtraTabPage = getTabPage(xtraTabControlStoresContent, "أضافة طقم"); } xtraTabPage.Controls.Clear(); xtraTabPage.Controls.Add(objForm); xtraTabControlStoresContent.SelectedTabPage = xtraTabPage; objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; objForm.Dock = DockStyle.Fill; objForm.Show(); }
//Ataqm CURD private void btnAtaqm_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { try { restForeColorOfNavBarItem(); NavBarItem navBarItem = (NavBarItem)sender; navBarItem.Appearance.ForeColor = Color.Blue; if (!xtraTabControlStoresContent.Visible) { xtraTabControlStoresContent.Visible = true; } XtraTabPage xtraTabPage = getTabPage(xtraTabControlStoresContent, "عرض الأطقم"); if (xtraTabPage == null) { xtraTabControlStoresContent.TabPages.Add("عرض الأطقم"); xtraTabPage = getTabPage(xtraTabControlStoresContent, "عرض الأطقم"); } xtraTabPage.Controls.Clear(); xtraTabControlStoresContent.SelectedTabPage = xtraTabPage; Ataqm objForm = new Ataqm(this); objForm.TopLevel = false; xtraTabPage.Controls.Add(objForm); objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; objForm.Dock = DockStyle.Fill; //objForm.DisplayAtaqm(); objForm.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }