Hi, I have a main form called MainForm I have a received checks form called DepositChequeForm, which is executed inside the MainForm with the help of the DocumentManager control at the time of the call. I have a notification form called NotificationForm, the checks whose payment date is approaching, are displayed in the form of a list in this form, which is executed independently of the MainForm form. Now I am going to write a code that when I click on one of the records in the notification list, the DepositChequeForm form will be executed with the help of the DocumentManager control inside the MainForm.
private void notificationGridView_DoubleClick(object sender, System.EventArgs e) { _chequeType = notificationGridView.GetFocusedRowCellValue("ChequeType").ToString(); if (string.Compare(_chequeType, "چک های دریافتی") == 0) { Infrastructure.Functions.NewChidFrom(new Financial.DepositChequeForm(), Infrastructure.ListForms.DepositCheckForm.Text); } } public static void NewChidFrom(DevExpress.XtraEditors.XtraForm form, string titleName) { bool IsOpen = false; foreach (System.Windows.Forms.Form frm in System.Windows.Forms.Application.OpenForms) { if (frm.Text == titleName) { IsOpen = true; frm.Focus(); break; } } if (!IsOpen) { form.MdiParent = APPLICATION_CAFE_RESTAURANT.MainForm.ActiveForm; form.Text = titleName; form.Show(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)