Guest User

Guest User

  • Tech Writer
  • 2.1k
  • 480.8k

windows form dialog popup

Apr 23 2021 8:23 PM
  1. // this is my default example, now how do i write inputs(if a user search for year, week) this must write into my table in the database. do i create a unique store procedure?  
  2.   
  3. private void button1_Click(object sender, EventArgs e)  
  4. {  
  5.     PopupForm popup = new PopupForm();  
  6.     DialogResult dialogresult = popup.ShowDialog();  
  7.     if (dialogresult == DialogResult.OK)  
  8.     {  
  9.         Console.WriteLine("You clicked OK");  
  10.     }  
  11.     else if (dialogresult == DialogResult.Cancel)  
  12.     {  
  13.         Console.WriteLine("You clicked either Cancel or X button in the top right corner");  
  14.     }  
  15.     popup.Dispose();  
  16. }  
Hi Team
 
I want to create a button that will call windows form, the form must have textfield(year, week) these two fields need to write inputs to the record(table) in the database. Are there any examples around this? please share thanks. 

Answers (1)