Click here to Skip to main content
15,887,434 members
Home / Discussions / C#
   

C#

 
GeneralRe: ODBC Type mismatch error Pin
Luc Pattyn26-Oct-09 14:53
sitebuilderLuc Pattyn26-Oct-09 14:53 
GeneralRe: ODBC Type mismatch error Pin
TheJudeDude26-Oct-09 15:41
TheJudeDude26-Oct-09 15:41 
GeneralRe: ODBC Type mismatch error Pin
Luc Pattyn26-Oct-09 15:46
sitebuilderLuc Pattyn26-Oct-09 15:46 
GeneralRe: ODBC Type mismatch error Pin
TheJudeDude27-Oct-09 3:49
TheJudeDude27-Oct-09 3:49 
AnswerRe: ODBC Type mismatch error Pin
Luc Pattyn26-Oct-09 10:05
sitebuilderLuc Pattyn26-Oct-09 10:05 
QuestionChecking required fields in a second Windows Form Pin
JTRizos26-Oct-09 8:31
JTRizos26-Oct-09 8:31 
AnswerRe: Checking required fields in a second Windows Form Pin
Not Active26-Oct-09 8:50
mentorNot Active26-Oct-09 8:50 
GeneralRe: Checking required fields in a second Windows Form Pin
JTRizos26-Oct-09 11:09
JTRizos26-Oct-09 11:09 
Thank you all for your responses. Here is the code that I have in Form1

public void ShowMyDialog()
{
Form2 qForm = new Form2();
qForm.ShowDialog();

if (qForm.ShowDialog ()== DialogResult.OK)
{
CaseNo = qForm.CaseNo;
Reason = qForm.Reason;
MessageBox.Show("Form2 Exists" + qForm.CaseNo + qForm.Reason);

if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("Both Case No and Reason are required");
ShowMyDialog();
}
}
}


Here's what is in Form2

public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}

public string CaseNo
{
get { return textBox1.Text; }
}
public string Reason
{
get { return textBox2.Text; }
}


public void button1_Click(object sender, System.EventArgs e)
{

}
}

CaseNo and Reason flow back to Form1 but I am having a problem knowing how and where to check for the these two fields being present. These code sees if the fields are present but then just passes through. Mark, is this what you were suggesting?

Thanx again!!!
GeneralRe: Checking required fields in a second Windows Form Pin
Not Active26-Oct-09 11:26
mentorNot Active26-Oct-09 11:26 
GeneralRe: Checking required fields in a second Windows Form Pin
JTRizos26-Oct-09 11:56
JTRizos26-Oct-09 11:56 
GeneralRe: Checking required fields in a second Windows Form Pin
Not Active26-Oct-09 12:44
mentorNot Active26-Oct-09 12:44 
GeneralRe: Checking required fields in a second Windows Form Pin
JTRizos26-Oct-09 13:03
JTRizos26-Oct-09 13:03 
GeneralRe: Checking required fields in a second Windows Form Pin
CodyDaemon29-Oct-09 5:54
CodyDaemon29-Oct-09 5:54 
GeneralRe: Checking required fields in a second Windows Form Pin
JTRizos29-Oct-09 6:24
JTRizos29-Oct-09 6:24 
AnswerRe: Checking required fields in a second Windows Form Pin
_Madmatt26-Oct-09 9:43
_Madmatt26-Oct-09 9:43 
GeneralRe: Checking required fields in a second Windows Form Pin
Not Active26-Oct-09 9:59
mentorNot Active26-Oct-09 9:59 
GeneralRe: Checking required fields in a second Windows Form Pin
_Madmatt27-Oct-09 9:45
_Madmatt27-Oct-09 9:45 
GeneralRe: Checking required fields in a second Windows Form Pin
Not Active27-Oct-09 10:10
mentorNot Active27-Oct-09 10:10 
GeneralRe: Checking required fields in a second Windows Form Pin
_Madmatt27-Oct-09 10:20
_Madmatt27-Oct-09 10:20 
GeneralRe: Checking required fields in a second Windows Form Pin
Not Active27-Oct-09 10:40
mentorNot Active27-Oct-09 10:40 
QuestionRe: Checking required fields in a second Windows Form [modified] Pin
JTRizos27-Oct-09 11:49
JTRizos27-Oct-09 11:49 
AnswerRe: Checking required fields in a second Windows Form Pin
Not Active27-Oct-09 14:50
mentorNot Active27-Oct-09 14:50 
GeneralRe: Checking required fields in a second Windows Form Pin
JTRizos28-Oct-09 5:57
JTRizos28-Oct-09 5:57 
GeneralRe: Checking required fields in a second Windows Form Pin
Not Active28-Oct-09 9:20
mentorNot Active28-Oct-09 9:20 
AnswerRe: Checking required fields in a second Windows Form Pin
JTRizos29-Oct-09 11:19
JTRizos29-Oct-09 11:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.