Click here to Skip to main content
15,903,201 members
Home / Discussions / C#
   

C#

 
AnswerRe: MAC Address Pin
PIEBALDconsult25-Nov-09 15:30
mvePIEBALDconsult25-Nov-09 15:30 
QuestionProblem while inserting a new row in database from C# application Pin
AprNgp24-Nov-09 22:22
AprNgp24-Nov-09 22:22 
AnswerRe: Problem while inserting a new row in database from C# application Pin
dan!sh 24-Nov-09 22:28
professional dan!sh 24-Nov-09 22:28 
GeneralRe: Problem while inserting a new row in database from C# application Pin
AprNgp24-Nov-09 22:34
AprNgp24-Nov-09 22:34 
GeneralRe: Problem while inserting a new row in database from C# application Pin
AprNgp24-Nov-09 22:37
AprNgp24-Nov-09 22:37 
GeneralRe: Problem while inserting a new row in database from C# application Pin
OriginalGriff24-Nov-09 22:42
mveOriginalGriff24-Nov-09 22:42 
GeneralRe: Problem while inserting a new row in database from C# application Pin
dan!sh 24-Nov-09 22:46
professional dan!sh 24-Nov-09 22:46 
GeneralRe: Problem while inserting a new row in database from C# application Pin
AprNgp24-Nov-09 23:10
AprNgp24-Nov-09 23:10 
private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtFirstName.Text == "")
                    MessageBox.Show("Patient's First Name can't be blank", "Incomplete data", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                else if (txtDOB.Text == "")
                    MessageBox.Show("Patient's Date of Birth can't be blank", "Incomplete data", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                
                if (txtLastName.Text == "")
                    txtLastName.Text = " ";
                bool gender = true;
                if (!rbMale.Checked)
                    gender = false;

                MRMDbDataSetTableAdapters.PatientsDetailsTableAdapter pdta = new MediRecordManager.MRMDbDataSetTableAdapters.PatientsDetailsTableAdapter();
                if (pdta.AddNewPatient(txtFirstName.Text, txtLastName.Text, calDOB.SelectionStart, (byte)cbBloodGroup.SelectedValue, gender) > 0)
                {
                    MessageBox.Show("Data inserted to database !");
                    btnCancel.Text = "Close";
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }


Apurv

“Never trust a computer you can’t throw out a window.”
(Steve Wozniak)

“There are only two industries that refer to their customers as ‘users’.”
(Edward Tufte)

GeneralRe: Problem while inserting a new row in database from C# application Pin
dojohansen25-Nov-09 1:11
dojohansen25-Nov-09 1:11 
AnswerRe: Problem while inserting a new row in database from C# application Pin
Covean24-Nov-09 23:57
Covean24-Nov-09 23:57 
GeneralRe: Problem while inserting a new row in database from C# application Pin
AprNgp24-Nov-09 23:59
AprNgp24-Nov-09 23:59 
GeneralRe: Problem while inserting a new row in database from C# application Pin
Covean25-Nov-09 1:04
Covean25-Nov-09 1:04 
QuestionQuestion ? Pin
Shaik Haneef24-Nov-09 22:01
Shaik Haneef24-Nov-09 22:01 
AnswerRe: Question ? Pin
Calla24-Nov-09 22:08
Calla24-Nov-09 22:08 
AnswerRe: Question ? Pin
OriginalGriff24-Nov-09 22:08
mveOriginalGriff24-Nov-09 22:08 
GeneralRe: Question ? Pin
dan!sh 24-Nov-09 22:27
professional dan!sh 24-Nov-09 22:27 
GeneralRe: Question ? Pin
OriginalGriff24-Nov-09 22:34
mveOriginalGriff24-Nov-09 22:34 
JokeRe: Question ? Pin
dan!sh 24-Nov-09 22:44
professional dan!sh 24-Nov-09 22:44 
QuestionPls Answer this one Pin
Shaik Haneef24-Nov-09 20:42
Shaik Haneef24-Nov-09 20:42 
AnswerRe: Pls Answer this one Pin
Ashfield24-Nov-09 21:07
Ashfield24-Nov-09 21:07 
GeneralRe: Pls Answer this one Pin
Shaik Haneef24-Nov-09 21:58
Shaik Haneef24-Nov-09 21:58 
AnswerRe: Pls Answer this one Pin
TheFoZ24-Nov-09 21:40
TheFoZ24-Nov-09 21:40 
QuestionConvert decimal value to exponential value Pin
Pankaj Saha24-Nov-09 20:18
Pankaj Saha24-Nov-09 20:18 
AnswerRe: Convert decimal value to exponential value Pin
dan!sh 24-Nov-09 21:53
professional dan!sh 24-Nov-09 21:53 
GeneralRe: Convert decimal value to exponential value Pin
Pankaj Saha24-Nov-09 23:35
Pankaj Saha24-Nov-09 23:35 

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.