Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
1.33/5 (3 votes)
See more:
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.


What I have tried:

C#
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();
			}
		}
Posted
Comments
Richard Deeming 11-Apr-23 5:47am    
You seem to have forgotten to ask a question.
Behfar Baghovvat 11-Apr-23 5:57am    
I mentioned above
Behfar Baghovvat 11-Apr-23 5:58am    
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.
Dave Kreskowiak 11-Apr-23 8:06am    
You only described what you have and what you intend to do. You did NOT describe a problem you're having or asked any question at all.
Behfar Baghovvat 15-Feb-24 1:31am    
The question was originally stated in the description itself, how can I transfer the information of the third form through the second form to the first form? Apparently, DevXpress doesn't have that option.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900