Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
QuestionBroadcastEventWindow not responding and program lockup Pin
0ryan011-Sep-05 16:19
0ryan011-Sep-05 16:19 
AnswerRe: BroadcastEventWindow not responding and program lockup Pin
S. Senthil Kumar11-Sep-05 21:56
S. Senthil Kumar11-Sep-05 21:56 
AnswerRe: BroadcastEventWindow not responding and program lockup Pin
leppie11-Sep-05 22:00
leppie11-Sep-05 22:00 
QuestionThreading in C# ! Pin
lucdt11-Sep-05 16:17
lucdt11-Sep-05 16:17 
AnswerRe: Threading in C# ! Pin
Andy Brummer11-Sep-05 17:50
sitebuilderAndy Brummer11-Sep-05 17:50 
GeneralRe: Threading in C# ! Pin
lucdt11-Sep-05 18:26
lucdt11-Sep-05 18:26 
Questionform flickers when z-order changed Pin
g00fyman11-Sep-05 15:48
g00fyman11-Sep-05 15:48 
QuestionProblem inserting records Pin
rich_wenger11-Sep-05 12:15
rich_wenger11-Sep-05 12:15 
:(Using VS2003 I've created a Windows Form database application to search, update, add and delete records from an SQL Server. Everything works fine until I swap out one of the textboxes for a databound combobox. The combo box is a drop down for "states" and I'm representing them as selected index values (integer) in the database which I bind to when I initialize the page. Search and Update functions work but the ADD (button3) record fails. Any help would be greatly appreciated.

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace ImmediateAccessWIP
{
///
/// Summary description for Form1.
///

public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.StatusBar statusBar1;
private System.Windows.Forms.Panel panel1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private ImmediateAccessWIP.dsStaffPhysicians dsStaffPhysicians1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txtBoxSPSearch;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.TextBox textBox7;
private System.Windows.Forms.ComboBox cBoxSPLicenseState;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Label lblRecordResults;
private System.Windows.Forms.MenuItem menuItem4;
///
/// Required designer variable.
///

private System.ComponentModel.Container components = null;

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code after InitializeComponent call
//
}

///
/// Clean up any resources being used.
///

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.statusBar1 = new System.Windows.Forms.StatusBar();
this.panel1 = new System.Windows.Forms.Panel();
this.textBox1 = new System.Windows.Forms.TextBox();
this.dsStaffPhysicians1 = new ImmediateAccessWIP.dsStaffPhysicians();
this.cBoxSPLicenseState = new System.Windows.Forms.ComboBox();
this.textBox7 = new System.Windows.Forms.TextBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button4 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.txtBoxSPSearch = new System.Windows.Forms.TextBox();
this.panel2 = new System.Windows.Forms.Panel();
this.lblRecordResults = new System.Windows.Forms.Label();
this.button8 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dsStaffPhysicians1)).BeginInit();
this.groupBox1.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1,
this.menuItem4});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem2,
this.menuItem3});
this.menuItem1.Text = "Mode";
//
// menuItem2
//
this.menuItem2.Index = 0;
this.menuItem2.Text = "Staff Physicians";
this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.Text = "Exit";
this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
//
// statusBar1
//
this.statusBar1.Location = new System.Drawing.Point(0, 544);
this.statusBar1.Name = "statusBar1";
this.statusBar1.Size = new System.Drawing.Size(792, 22);
this.statusBar1.TabIndex = 0;
this.statusBar1.Text = "statusBar1";
//
// panel1
//
this.panel1.Controls.Add(this.textBox1);
this.panel1.Controls.Add(this.cBoxSPLicenseState);
this.panel1.Controls.Add(this.textBox7);
this.panel1.Controls.Add(this.textBox6);
this.panel1.Controls.Add(this.textBox4);
this.panel1.Controls.Add(this.textBox3);
this.panel1.Controls.Add(this.textBox2);
this.panel1.Controls.Add(this.groupBox1);
this.panel1.Controls.Add(this.panel2);
this.panel1.Location = new System.Drawing.Point(16, 24);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(760, 448);
this.panel1.TabIndex = 1;
this.panel1.Visible = false;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(32, 136);
this.textBox1.Name = "textBox1";
this.textBox1.TabIndex = 8;
this.textBox1.Text = "";
//
// dsStaffPhysicians1
//
this.dsStaffPhysicians1.DataSetName = "dsStaffPhysicians";
this.dsStaffPhysicians1.Locale = new System.Globalization.CultureInfo("en-US");
//
// cBoxSPLicenseState
//
this.cBoxSPLicenseState.Items.AddRange(new object[] {
"",
"AK",
"AL",
"AR",
"AZ",
"CA",
"CT",
"DC",
"DE",
"FL",
"GA",
"HI",
"IA",
"ID",
"IL",
"IN",
"KS",
"KY",
"LA",
"MA",
"MD",
"ME",
"MI",
"MN",
"MO",
"MS",
"MT",
"NC",
"ND",
"NE",
"NH",
"NJ",
"NM",
"NV",
"NY",
"OH",
"OK",
"OR",
"PA",
"RI",
"SC",
"SD",
"TN",
"TX",
"UT",
"VA",
"VT",
"WA",
"WI",
"WV",
"WY"});
this.cBoxSPLicenseState.Location = new System.Drawing.Point(32, 184);
this.cBoxSPLicenseState.Name = "cBoxSPLicenseState";
this.cBoxSPLicenseState.Size = new System.Drawing.Size(48, 21);
this.cBoxSPLicenseState.TabIndex = 7;
//
// textBox7
//
this.textBox7.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dsStaffPhysicians1, "tblStaffPhysicians.docUpin"));
this.textBox7.Location = new System.Drawing.Point(288, 136);
this.textBox7.Name = "textBox7";
this.textBox7.TabIndex = 6;
this.textBox7.Text = "";
//
// textBox6
//
this.textBox6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dsStaffPhysicians1, "tblStaffPhysicians.docLicenseNumber"));
this.textBox6.Location = new System.Drawing.Point(160, 136);
this.textBox6.Name = "textBox6";
this.textBox6.TabIndex = 5;
this.textBox6.Text = "";
//
// textBox4
//
this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dsStaffPhysicians1, "tblStaffPhysicians.docLName"));
this.textBox4.Location = new System.Drawing.Point(288, 96);
this.textBox4.Name = "textBox4";
this.textBox4.TabIndex = 3;
this.textBox4.Text = "";
//
// textBox3
//
this.textBox3.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dsStaffPhysicians1, "tblStaffPhysicians.docMName"));
this.textBox3.Location = new System.Drawing.Point(160, 96);
this.textBox3.Name = "textBox3";
this.textBox3.TabIndex = 2;
this.textBox3.Text = "";
//
// textBox2
//
this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dsStaffPhysicians1, "tblStaffPhysicians.docFName"));
this.textBox2.Location = new System.Drawing.Point(32, 96);
this.textBox2.Name = "textBox2";
this.textBox2.TabIndex = 1;
this.textBox2.Text = "";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.button4);
this.groupBox1.Controls.Add(this.button3);
this.groupBox1.Controls.Add(this.button2);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Controls.Add(this.txtBoxSPSearch);
this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBox1.Location = new System.Drawing.Point(24, 16);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(544, 48);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Search By Name:";
//
// button4
//
this.button4.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.button4.Location = new System.Drawing.Point(405, 15);
this.button4.Name = "button4";
this.button4.TabIndex = 4;
this.button4.Text = "button4";
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// button3
//
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.button3.Location = new System.Drawing.Point(312, 15);
this.button3.Name = "button3";
this.button3.TabIndex = 3;
this.button3.Text = "button3";
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button2
//
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.button2.Location = new System.Drawing.Point(219, 15);
this.button2.Name = "button2";
this.button2.TabIndex = 2;
this.button2.Text = "button2";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.button1.Location = new System.Drawing.Point(126, 15);
this.button1.Name = "button1";
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// txtBoxSPSearch
//
this.txtBoxSPSearch.Location = new System.Drawing.Point(8, 16);
this.txtBoxSPSearch.Name = "txtBoxSPSearch";
this.txtBoxSPSearch.TabIndex = 0;
this.txtBoxSPSearch.Text = "";
//
// panel2
//
this.panel2.Controls.Add(this.lblRecordResults);
this.panel2.Controls.Add(this.button8);
this.panel2.Controls.Add(this.button7);
this.panel2.Controls.Add(this.button6);
this.panel2.Controls.Add(this.button5);
this.panel2.Location = new System.Drawing.Point(144, 352);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(520, 56);
this.panel2.TabIndex = 2;
//
// lblRecordResults
//
this.lblRecordResults.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.lblRecordResults.Location = new System.Drawing.Point(208, 19);
this.lblRecordResults.Name = "lblRecordResults";
this.lblRecordResults.Size = new System.Drawing.Size(100, 16);
this.lblRecordResults.TabIndex = 4;
this.lblRecordResults.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// button8
//
this.button8.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.button8.Location = new System.Drawing.Point(416, 16);
this.button8.Name = "button8";
this.button8.TabIndex = 3;
this.button8.Text = "Last";
this.button8.Click += new System.EventHandler(this.button8_Click);
//
// button7
//
this.button7.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.button7.Location = new System.Drawing.Point(328, 16);
this.button7.Name = "button7";
this.button7.TabIndex = 2;
this.button7.Text = "Next";
this.button7.Click += new System.EventHandler(this.button7_Click);
//
// button6
//
this.button6.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.button6.Location = new System.Drawing.Point(120, 16);
this.button6.Name = "button6";
this.button6.TabIndex = 1;
this.button6.Text = "Previous";
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// button5
//
this.button5.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.button5.Location = new System.Drawing.Point(32, 16);
this.button5.Name = "button5";
this.button5.TabIndex = 0;
this.button5.Text = "First";
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// sqlDataAdapter1
//
this.sqlDataAdapter1.DeleteCommand = this.sqlDeleteCommand1;
this.sqlDataAdapter1.InsertCommand = this.sqlInsertCommand1;
this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand1;
this.sqlDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "tblStaffPhysicians", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("docIndex", "docIndex"),
new System.Data.Common.DataColumnMapping("docLName", "docLName"),
new System.Data.Common.DataColumnMapping("docFName", "docFName"),
new System.Data.Common.DataColumnMapping("docMName", "docMName"),
new System.Data.Common.DataColumnMapping("docLicenseState", "docLicenseState"),
new System.Data.Common.DataColumnMapping("docLicenseNumber", "docLicenseNumber"),
new System.Data.Common.DataColumnMapping("docUpin", "docUpin"),
new System.Data.Common.DataColumnMapping("docAddress1", "docAddress1"),
new System.Data.Common.DataColumnMapping("docAddress2", "docAddress2"),
new System.Data.Common.DataColumnMapping("docCity", "docCity"),
new System.Data.Common.DataColumnMapping("docState", "docState"),
new System.Data.Common.DataColumnMapping("docZip", "docZip"),
new System.Data.Common.DataColumnMapping("docSpecialty", "docSpecialty"),
new System.Data.Common.DataColumnMapping("docPhone1", "docPhone1"),
new System.Data.Common.DataColumnMapping("docPhoneType1", "docPhoneType1"),
new System.Data.Common.DataColumnMapping("docPhone2", "docPhone2"),
new System.Data.Common.DataColumnMapping("docPhoneType2", "docPhoneType2"),
new System.Data.Common.DataColumnMapping("docPhone3", "docPhone3"),
new System.Data.Common.DataColumnMapping("docPhoneType3", "docPhoneType3"),
new System.Data.Common.DataColumnMapping("docPhone4", "docPhone4"),
new System.Data.Common.DataColumnMapping("docPhoneType4", "docPhoneType4"),
new System.Data.Common.DataColumnMapping("docEmail", "docEmail"),
new System.Data.Common.DataColumnMapping("recCreatedBy", "recCreatedBy"),
new System.Data.Common.DataColumnMapping("recModifiedBy", "recModifiedBy"),
new System.Data.Common.DataColumnMapping("recCreated", "recCreated"),
new System.Data.Common.DataColumnMapping("recModified", "recModified")})});
this.sqlDataAdapter1.UpdateCommand = this.sqlUpdateCommand1;
//
// sqlDeleteCommand1
//
this.sqlDeleteCommand1.CommandText = "[SP_StaffPhysicianDeleteCommand]";
this.sqlDeleteCommand1.CommandType = System.Data.CommandType.StoredProcedure;
this.sqlDeleteCommand1.Connection = this.sqlConnection1;
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, false, ((System.Byte)(0)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docIndex", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docIndex", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docAddress1", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docAddress1", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docAddress2", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docAddress2", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docCity", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docCity", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docEmail", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docEmail", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docFName", System.Data.SqlDbType.VarChar, 35, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docFName", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docLName", System.Data.SqlDbType.VarChar, 35, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docLName", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docLicenseNumber", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docLicenseNumber", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docLicenseState", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docLicenseState", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docMName", System.Data.SqlDbType.VarChar, 35, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docMName", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhone1", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhone1", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhone2", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhone2", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhone3", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhone3", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhone4", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhone4", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhoneType1", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhoneType1", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhoneType2", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhoneType2", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhoneType3", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhoneType3", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhoneType4", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhoneType4", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docSpecialty", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docSpecialty", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docState", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docState", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docUpin", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docUpin", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docZip", System.Data.SqlDbType.VarChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docZip", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_recCreated", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "recCreated", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_recCreatedBy", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "recCreatedBy", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_recModified", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "recModified", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_recModifiedBy", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "recModifiedBy", System.Data.DataRowVersion.Original, null));
//
// sqlConnection1
//
this.sqlConnection1.ConnectionString = "workstation id=COLOSSUS;packet size=4096;user id=ia;data source=QUEEN01;persist s" +
"ecurity info=True;initial catalog=ImmediateAccessWIP;password=pass4u";
//
// sqlInsertCommand1
//
this.sqlInsertCommand1.CommandText = "[SP_StaffPhysicianInsertCommand]";
this.sqlInsertCommand1.CommandType = System.Data.CommandType.StoredProcedure;
this.sqlInsertCommand1.Connection = this.sqlConnection1;
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, false, ((System.Byte)(0)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docLName", System.Data.SqlDbType.VarChar, 35, "docLName"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docFName", System.Data.SqlDbType.VarChar, 35, "docFName"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docMName", System.Data.SqlDbType.VarChar, 35, "docMName"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docLicenseState", System.Data.SqlDbType.TinyInt, 1, "docLicenseState"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docLicenseNumber", System.Data.SqlDbType.VarChar, 20, "docLicenseNumber"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docUpin", System.Data.SqlDbType.VarChar, 20, "docUpin"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docAddress1", System.Data.SqlDbType.VarChar, 50, "docAddress1"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docAddress2", System.Data.SqlDbType.VarChar, 50, "docAddress2"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docCity", System.Data.SqlDbType.VarChar, 50, "docCity"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docState", System.Data.SqlDbType.TinyInt, 1, "docState"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docZip", System.Data.SqlDbType.VarChar, 5, "docZip"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docSpecialty", System.Data.SqlDbType.VarChar, 50, "docSpecialty"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhone1", System.Data.SqlDbType.VarChar, 20, "docPhone1"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhoneType1", System.Data.SqlDbType.TinyInt, 1, "docPhoneType1"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhone2", System.Data.SqlDbType.VarChar, 20, "docPhone2"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhoneType2", System.Data.SqlDbType.TinyInt, 1, "docPhoneType2"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhone3", System.Data.SqlDbType.VarChar, 20, "docPhone3"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhoneType3", System.Data.SqlDbType.TinyInt, 1, "docPhoneType3"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhone4", System.Data.SqlDbType.VarChar, 20, "docPhone4"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhoneType4", System.Data.SqlDbType.TinyInt, 1, "docPhoneType4"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docEmail", System.Data.SqlDbType.VarChar, 50, "docEmail"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@recCreatedBy", System.Data.SqlDbType.VarChar, 20, "recCreatedBy"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@recModifiedBy", System.Data.SqlDbType.VarChar, 20, "recModifiedBy"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@recCreated", System.Data.SqlDbType.DateTime, 8, "recCreated"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@recModified", System.Data.SqlDbType.DateTime, 8, "recModified"));
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "[SP_StaffPhysicianSelectCommand]";
this.sqlSelectCommand1.CommandType = System.Data.CommandType.StoredProcedure;
this.sqlSelectCommand1.Connection = this.sqlConnection1;
this.sqlSelectCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, false, ((System.Byte)(0)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null));
this.sqlSelectCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Param2", System.Data.SqlDbType.VarChar, 35, "docLName"));
//
// sqlUpdateCommand1
//
this.sqlUpdateCommand1.CommandText = "[SP_StaffPhysicianUpdateCommand]";
this.sqlUpdateCommand1.CommandType = System.Data.CommandType.StoredProcedure;
this.sqlUpdateCommand1.Connection = this.sqlConnection1;
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, false, ((System.Byte)(0)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docLName", System.Data.SqlDbType.VarChar, 35, "docLName"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docFName", System.Data.SqlDbType.VarChar, 35, "docFName"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docMName", System.Data.SqlDbType.VarChar, 35, "docMName"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docLicenseState", System.Data.SqlDbType.TinyInt, 1, "docLicenseState"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docLicenseNumber", System.Data.SqlDbType.VarChar, 20, "docLicenseNumber"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docUpin", System.Data.SqlDbType.VarChar, 20, "docUpin"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docAddress1", System.Data.SqlDbType.VarChar, 50, "docAddress1"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docAddress2", System.Data.SqlDbType.VarChar, 50, "docAddress2"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docCity", System.Data.SqlDbType.VarChar, 50, "docCity"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docState", System.Data.SqlDbType.TinyInt, 1, "docState"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docZip", System.Data.SqlDbType.VarChar, 5, "docZip"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docSpecialty", System.Data.SqlDbType.VarChar, 50, "docSpecialty"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhone1", System.Data.SqlDbType.VarChar, 20, "docPhone1"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhoneType1", System.Data.SqlDbType.TinyInt, 1, "docPhoneType1"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhone2", System.Data.SqlDbType.VarChar, 20, "docPhone2"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhoneType2", System.Data.SqlDbType.TinyInt, 1, "docPhoneType2"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhone3", System.Data.SqlDbType.VarChar, 20, "docPhone3"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhoneType3", System.Data.SqlDbType.TinyInt, 1, "docPhoneType3"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhone4", System.Data.SqlDbType.VarChar, 20, "docPhone4"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docPhoneType4", System.Data.SqlDbType.TinyInt, 1, "docPhoneType4"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docEmail", System.Data.SqlDbType.VarChar, 50, "docEmail"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@recCreatedBy", System.Data.SqlDbType.VarChar, 20, "recCreatedBy"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@recModifiedBy", System.Data.SqlDbType.VarChar, 20, "recModifiedBy"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@recCreated", System.Data.SqlDbType.DateTime, 8, "recCreated"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@recModified", System.Data.SqlDbType.DateTime, 8, "recModified"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docIndex", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docIndex", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docAddress1", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docAddress1", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docAddress2", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docAddress2", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docCity", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docCity", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docEmail", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docEmail", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docFName", System.Data.SqlDbType.VarChar, 35, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docFName", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docLName", System.Data.SqlDbType.VarChar, 35, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docLName", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docLicenseNumber", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docLicenseNumber", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docLicenseState", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docLicenseState", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docMName", System.Data.SqlDbType.VarChar, 35, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docMName", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhone1", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhone1", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhone2", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhone2", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhone3", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhone3", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhone4", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhone4", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhoneType1", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhoneType1", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhoneType2", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhoneType2", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhoneType3", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhoneType3", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docPhoneType4", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docPhoneType4", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docSpecialty", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docSpecialty", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docState", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docState", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docUpin", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docUpin", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_docZip", System.Data.SqlDbType.VarChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "docZip", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_recCreated", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "recCreated", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_recCreatedBy", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "recCreatedBy", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_recModified", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "recModified", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_recModifiedBy", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "recModifiedBy", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@docIndex", System.Data.SqlDbType.Int, 4, "docIndex"));
//
// menuItem4
//
this.menuItem4.Index = 1;
this.menuItem4.Text = "Help";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(792, 566);
this.Controls.Add(this.panel1);
this.Controls.Add(this.statusBar1);
this.Menu = this.mainMenu1;
this.Name = "Form1";
this.Text = "Immediate Access v1.01";
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dsStaffPhysicians1)).EndInit();
this.groupBox1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);

}
#endregion

///
/// The main entry point for the application.
///

[STAThread]
static void Main()
{
Application.Run(new Form1());
}

private void menuItem2_Click(object sender, System.EventArgs e)
{
//Load Staff Physician Screen
SetupStaffPhysician();
}

private void menuItem3_Click(object sender, System.EventArgs e)
{
//Exit Application
Application.Exit();
}
private void SetupStaffPhysician()
{
panel1.Visible = true;
button4.Enabled =false;
button1.Text = "Search";
button2.Text = "Clear";
button3.Text= "Add";
button4.Text = "Delete";
statusBar1.Text = "Ready";
this.lblRecordResults.Text = "";
DisableNavigation();
ClearStaffPhysicians();
DisableStaffPhysicians();
this.cBoxSPLicenseState.DataBindings.Add(new System.Windows.Forms.Binding("SelectedIndex", this.dsStaffPhysicians1, "tblStaffPhysicians.docLicenseState"));
}


private void button1_Click(object sender, System.EventArgs e)
{
if(this.button1.Text.Equals("Search"))
{
sqlDataAdapter1.SelectCommand.Parameters["@Param2"].Value = txtBoxSPSearch.Text;
dsStaffPhysicians1.Clear();
sqlDataAdapter1.Fill(dsStaffPhysicians1);
SPRecordPosition();
this.txtBoxSPSearch.Enabled = false;
this.statusBar1.Text = "Search Completed";
}
else if(this.button1.Text.Equals("Update"))
{
this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].EndCurrentEdit();
sqlDataAdapter1.Update(dsStaffPhysicians1);
this.button1.Enabled = false;
this.statusBar1.Text = "Update Completed";
}
}

private void button2_Click(object sender, System.EventArgs e)
{
if(this.button2.Text.Equals("Clear"))
{
dsStaffPhysicians1.Clear();
SPRecordPosition();
this.button1.Enabled = true;
this.txtBoxSPSearch.Enabled = true;
this.txtBoxSPSearch.Text = "";
this.button1.Text = "Search";
this.statusBar1.Text = "Ready";
}
else
{
//TODO
}
}

private void button3_Click(object sender, System.EventArgs e)
{
if(this.button3.Text.Equals("Add"))
{
//Prepare For Insert
this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].AddNew();
this.button3.Text = "Apply";
EnableStaffPhysicians();
DisableNavigation();
ClearStaffPhysicians();
button1.Enabled = false;
button2.Enabled = false;
button4.Enabled = true;
this.txtBoxSPSearch.Enabled = false;
this.txtBoxSPSearch.Text = "";
button4.Text = "Cancel";
this.statusBar1.Text = "Begin Edit";
}
else if(this.button3.Text.Equals("Apply"))
{ //Finish Insert
this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].EndCurrentEdit();
sqlDataAdapter1.Update(dsStaffPhysicians1);
button1.Enabled = true;
button2.Enabled = true;
button1.Text = "Update";
button3.Text = "Add";
button4.Text = "Delete";
SPRecordPosition();
this.statusBar1.Text = "Record Inserted";
}
else if(this.button3.Text.Equals("Cancel"))
{
this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].CancelCurrentEdit();
button1.Enabled = true;
button2.Enabled = true;
EnableNavigation();
button3.Text = "Add";
button4.Text = "Delete";
}
}
private void button4_Click(object sender, System.EventArgs e)
{
if(this.button4.Text.Equals("Cancel"))
{
button3.Text = "Add";
button4.Text = "Delete";
button2.Enabled = true;
button1.Enabled = true;
this.txtBoxSPSearch.Enabled = true;
this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].CancelCurrentEdit();
SPRecordPosition();
}
else if(this.button4.Text.Equals("Delete"))
{
button1.Enabled = false;
button2.Enabled = false;
button3.Text = "Cancel";
button4.Text = "Apply";
DisableNavigation();
statusBar1.Text = "Confirm Delete";
}
else if(this.button4.Text.Equals("Apply"))
{
this.dsStaffPhysicians1.tblStaffPhysicians.Rows[this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].Position].Delete();
sqlDataAdapter1.Update(dsStaffPhysicians1);
sqlDataAdapter1.Fill(dsStaffPhysicians1);
button4.Text = "Delete";
button1.Enabled = true;
button2.Enabled = true;
button3.Text = "Add";
EnableNavigation();
}
}
private void button5_Click(object sender, System.EventArgs e)
{
this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].Position = 0;
this.dsStaffPhysicians1.RejectChanges();
SPRecordPosition();
}

private void button6_Click(object sender, System.EventArgs e)
{
this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].Position -= 1;
this.dsStaffPhysicians1.RejectChanges();
SPRecordPosition();
}

private void button7_Click(object sender, System.EventArgs e)
{
this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].Position += 1;
this.dsStaffPhysicians1.RejectChanges();
SPRecordPosition();
}

private void button8_Click(object sender, System.EventArgs e)
{
this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].Position = this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].Count -1;
this.dsStaffPhysicians1.RejectChanges();
SPRecordPosition();
}


private void SPRecordPosition()
{
try //Record position and navigation buttons
{
int iCnt;
int iPos;
iCnt = this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].Count;
iPos = this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].Position + 1;
if(iCnt == 0)
{
lblRecordResults.Text = "No Records";
DisableStaffPhysicians();
DisableNavigation();
this.button1.Text = "Search";
button4.Enabled = false;
}
else
{
lblRecordResults.Text = iPos.ToString() + " of " + iCnt.ToString();
EnableStaffPhysicians();
EnableNavigation();
button1.Enabled = true;
button4.Enabled = true;
button1.Text = "Update";
button2.Text = "Clear";
}
if(iCnt <= 1)
{
button5.Enabled = false;
button6.Enabled = false;
button7.Enabled = false;
button8.Enabled = false;
}
else
{
if(iPos >= 2)
{
button5.Enabled = true;
button6.Enabled = true;
}
else
{
button5.Enabled = false;
button6.Enabled = false;
}
if(iPos == iCnt)
{
button7.Enabled = false;
button8.Enabled = false;
}
else
{
button7.Enabled = true;
button8.Enabled = true;
}
}
}
catch(Exception exp)
{
MessageBox.Show("Error 003 " + exp.Message);
}

}
private void EnableNavigation()
{
button5.Enabled = true;
button6.Enabled = true;
button7.Enabled = true;
button8.Enabled = true;
}
private void DisableNavigation()
{
button5.Enabled = false;
button6.Enabled = false;
button7.Enabled = false;
button8.Enabled = false;
}
private void ClearStaffPhysicians()
{
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
textBox4.Text = "";
textBox7.Text = "";
textBox6.Text = "";
cBoxSPLicenseState.SelectedIndex = 0;
}
private void EnableStaffPhysicians()
{
textBox1.Enabled = true;
textBox2.Enabled = true;
textBox3.Enabled = true;
textBox4.Enabled = true;
textBox7.Enabled = true;
textBox6.Enabled = true;
}
private void DisableStaffPhysicians()
{
textBox1.Enabled = false;
textBox2.Enabled = false;
textBox3.Enabled = false;
textBox4.Enabled = false;
textBox7.Enabled = false;
textBox6.Enabled = false;
}



}
}
AnswerRe: Problem inserting records Pin
Christian Graus11-Sep-05 15:26
protectorChristian Graus11-Sep-05 15:26 
GeneralRe: Problem inserting records Pin
rich_wenger12-Sep-05 11:00
rich_wenger12-Sep-05 11:00 
GeneralRe: Problem inserting records Pin
Christian Graus12-Sep-05 12:02
protectorChristian Graus12-Sep-05 12:02 
AnswerRe: Problem inserting records Pin
leppie11-Sep-05 22:20
leppie11-Sep-05 22:20 
GeneralRe: Problem inserting records Pin
rich_wenger12-Sep-05 11:05
rich_wenger12-Sep-05 11:05 
GeneralRe: Problem inserting records Pin
Christian Graus12-Sep-05 12:08
protectorChristian Graus12-Sep-05 12:08 
GeneralRe: Problem inserting records Pin
rich_wenger12-Sep-05 12:42
rich_wenger12-Sep-05 12:42 
GeneralRe: Problem inserting records Pin
Christian Graus12-Sep-05 12:45
protectorChristian Graus12-Sep-05 12:45 
GeneralRe: Problem inserting records Pin
rich_wenger12-Sep-05 13:08
rich_wenger12-Sep-05 13:08 
GeneralRe: Problem inserting records Pin
Christian Graus12-Sep-05 13:13
protectorChristian Graus12-Sep-05 13:13 
GeneralRe: Problem inserting records Pin
rich_wenger12-Sep-05 13:26
rich_wenger12-Sep-05 13:26 
GeneralRe: Problem inserting records Pin
Christian Graus12-Sep-05 13:35
protectorChristian Graus12-Sep-05 13:35 
QuestionHow to use this in another handler?? Pin
Anonymous11-Sep-05 12:08
Anonymous11-Sep-05 12:08 
AnswerRe: How to use this in another handler?? Pin
Mohamad Al Husseiny11-Sep-05 12:15
Mohamad Al Husseiny11-Sep-05 12:15 
AnswerRe: How to use this in another handler?? Pin
Christian Graus11-Sep-05 15:27
protectorChristian Graus11-Sep-05 15:27 
QuestionTemplateColumn for DataTable Pin
Expert Coming11-Sep-05 11:13
Expert Coming11-Sep-05 11:13 
AnswerRe: TemplateColumn for DataTable Pin
Andy Brummer11-Sep-05 12:53
sitebuilderAndy Brummer11-Sep-05 12:53 

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.