winforms - Passing a Date Value from one Windows From to Another Form in C# -
I am working on a very complex project and I am very new to the windows project.
I have 2 forms
-
ViewSchedule.cs
scheduler.cs (this is a dialog form
/ ul> viewable CS to select two dates are selected. They have been saved in the answer:
_fromDate = dtFromDate.DateTime.ToUniversalTime (); _toDate = dtToDate.DateTime.ToUniversalTime ();
Form 2 is the
Scheduler CS is a dialog form I
" text ">You need to set these properties before creating a public property in the dialog form and displaying the dialog.
Then use these on-value property values.
Add to form2 Date Properties:
Public Partial Category Form 2: Form {Public Date Time Date 1; Set; } Public Date Time Date 2 {Received; Set; } Public Form 2 () {Initialization (); }}
and access to Form 1 as follows:
Private Zero Form 1_load (Object Sender, EventEurge E) {Form 2 FM = 2 Form 2 (); Frm2.Date1 = DateTime.Now; Frm2.Date2 = DateTime.Now; Frm2.ShowDialog (); }
Comments
Post a Comment