Exemplo n.º 1
0
        private void button4_Click(object sender, EventArgs e)
        {
            this.Hide();
            bill b = new bill();

            b.Show();
        }
Exemplo n.º 2
0
 private void outpatientToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     OutpatientBill = new bill();
     OutpatientBill.PatientCateogtyLeble.Text = " Outpatient's Bill";
     OutpatientBill.proomcharge.Text          = "0";
     OutpatientBill.outpatient  = true;
     OutpatientBill.label7.Text = "Appoinment Date :";
     OutpatientBill.ShowDialog();
 }
Exemplo n.º 3
0
 private void inpatientToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     this.Hide();
     billCheck      = new bill();
     billCheck.User = "******";
     billCheck.PatientCateogtyLeble.Text = "Inpatiet Bill";
     billCheck.panel1.Enabled            = false;
     billCheck.Show();
 }
Exemplo n.º 4
0
        private void button8_Click(object sender, EventArgs e)
        {
            SqlDataAdapter cc = new SqlDataAdapter(" SELECT Bill_no FROM Inpatientbill", c);

            DataTable dw = new DataTable();

            cc.Fill(dw);


            foreach (DataRow item in dw.Rows)
            {
                int      n  = 0;
                string[] wn = new string[4];
                wn[n] = item[0].ToString();


                if (pid.Text == wn[n])
                {
                    MessageBox.Show("This is am old bill \n Add new");

                    st = false;
                }
            }

            if (st)
            {
                if (pid.Text == "" || pname.Text == "" || pgender.Text == "" || padmitdate.Text == "" || pdischargedate.Text == "" || proomcharge.Text == "" || pathologyFees.Text == "" || doctorCharge.Text == "" || others.Text == "" || Total.Text == "")
                {
                    MessageBox.Show("Fill all boxes");
                    this.Close();
                    bill b = new bill();
                    b.Show();
                }
                else
                {
                    c.Open();

                    SqlCommand cm = new SqlCommand("INSERT INTO Inpatientbill (Bill_no, bDate, p_id, p_name, p_age, p_gender, admit_date, Discharge_date, Room_Charges, Pathology_fees, Doctor_Fees, Miscellaneous, Total_Amount) VALUES ('" + billno.Text + "','" + billdate.Text + "','" + pid.Text + "','" + pname.Text + "','" + page.Text + "','" + pgender.Text + "','" + padmitdate.Text + "','" + pdischargedate.Text + "','" + proomcharge.Text + "','" + pathologyFees.Text + "','" + doctorCharge.Text + "','" + others.Text + "','" + Total.Text + "')", c);
                    cm.ExecuteNonQuery();
                    c.Close();


                    MessageBox.Show("Successfully Saved.");

                    setBillNo();
                    Display();
                    pid.Text            = "";
                    pname.Text          = "";
                    page.Text           = "";
                    pgender.Text        = "";
                    padmitdate.Text     = "";
                    pdischargedate.Text = "";
                    proomcharge.Text    = "";
                    pathologyFees.Text  = "";
                    others.Text         = "";
                    doctorCharge.Text   = "";
                    Total.Text          = "0";

                    st = false;
                }
            }
        }
Exemplo n.º 5
0
 private void inpatientToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     InpatientBill = new bill();
     InpatientBill.ShowDialog();
 }