Beispiel #1
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        hdbmsClass lib      = new hdbmsClass();
        DataSet    ds       = new DataSet();
        string     msg      = "";
        string     userName = txtUsername.Text;
        string     password = txtPassword.Text;


        ds = lib.fetchStaffByUsername_Password(userName, password, ref msg);


        if (msg != "" || ds.Tables.Count == 0)
        {
            lblErrormsg.Text = "unable to fetch staff as a result of " + msg;
            MessageBox.Show("Incorrect Details!!!");
            return;
        }

        Panel10.Visible = true;
        Panel5.Visible  = false;
        Panel1.Visible  = true;
        Panel11.Visible = true;

        lblStaffname.Text      = ds.Tables[0].Rows[0]["STAFF_NAME"].ToString();
        lblStaffID.Text        = ds.Tables[0].Rows[0]["STAFF_ID"].ToString();
        imgPassport.ImageUrl   = ds.Tables[0].Rows[0]["IMAGE_UPLOAD"].ToString();
        lblSubscriberName.Text = ds.Tables[0].Rows[0]["SUBSCRIBER_NAME"].ToString();
        lblSubscriberID.Text   = ds.Tables[0].Rows[0]["SUBSCRIBER_ID"].ToString();
        lblStaffname2.Text     = ds.Tables[0].Rows[0]["STAFF_NAME"].ToString();
    }
Beispiel #2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        hdbmsClass lib = new hdbmsClass();
        string     msg = "";
        //decimal subscriberID = lib.GenerateTransID(ref msg);
        decimal  subscriberID      = Convert.ToDecimal(txtSubscriberID.Text);
        string   subscriberName    = txtSubscriberName.Text;
        string   description       = txtDescription.Text;
        decimal  amount            = Convert.ToDecimal(txtAmount.Text);
        decimal  paid              = Convert.ToDecimal(txtPaid.Text);
        decimal  balance           = Convert.ToDecimal(txtBalance.Text);
        DateTime subscriptionDate  = Convert.ToDateTime(dateSubscriptionDate.Value);
        DateTime expiryDate        = Convert.ToDateTime(dateExpiryDate.Value);
        string   subscriberAddress = txtSubscriberAddress.Text;
        string   phoneNumber       = txtPhoneNumber.Text;

        lib.insertSubscriber_tbl(subscriberID, subscriberName, description, amount, paid, balance, subscriptionDate, expiryDate, subscriberAddress, phoneNumber, ref msg);
        if (msg != "")
        {
            LblMessage.Text = "unable to register subscriber as a result of " + msg;
            MessageBox.Show("Registration failed!!!");
            return;
        }
        MessageBox.Show("Successful!");
    }
Beispiel #3
0
    protected void Button18_Click(object sender, EventArgs e)
    {
        FileUpload2.SaveAs(Server.MapPath("results").ToString() + @"\" + FileUpload2.FileName);

        hdbmsClass lib = new hdbmsClass();
        string     msg = "";
        //decimal subscriberID = lib.GenerateTransID(ref msg);

        string   patientID    = lblPatientID.Text;
        string   patientName  = lblPatientName.Text;
        DateTime testDate     = Convert.ToDateTime(RegDate.Value);
        string   staffID      = lblStaffID.Text;
        string   doctorID     = lblDoctorID.Text;
        string   hospitalName = lblSubscriberName.Text;



        lib.insertWard_round_tbl(patientID, patientName, testDate, staffID, doctorID, hospitalName, ref msg);

        if (msg != "")
        {
            lblMessage.Text = "unable to update vital signs report as a result of " + msg;
            MessageBox.Show("Registration failed!!!");
            return;
        }
        MessageBox.Show("Successful!");
    }
Beispiel #4
0
    protected void Button17_Click(object sender, EventArgs e)
    {
        FileUpload1.SaveAs(Server.MapPath("results").ToString() + @"\" + FileUpload1.FileName);

        hdbmsClass lib = new hdbmsClass();
        string     msg = "";
        //decimal subscriberID = lib.GenerateTransID(ref msg);

        string   patientID        = lblPatientID.Text;
        string   patientName      = lblPatientName.Text;
        DateTime testDate         = Convert.ToDateTime(dateTest.Value);
        string   bodyTemperature  = txtBodyTemperature.Text;
        string   bodyPressure     = txtBodyPressure.Text;
        string   pulseRate        = txtPulseRate.Text;
        string   heartRate        = txtHeartRate.Text;
        string   respiration      = txtRespiration.Text;
        string   oxygenSaturation = txtOxygenSaturation.Text;
        string   staffID          = lblStaffID.Text;
        string   hospitalName     = lblSubscriberName.Text;



        lib.insertVital_Signs_tbl(patientID, patientName, testDate, bodyTemperature, bodyPressure, pulseRate, heartRate, respiration, oxygenSaturation, staffID, hospitalName, ref msg);

        if (msg != "")
        {
            lblMessage.Text = "unable to update vital signs report as a result of " + msg;
            MessageBox.Show("Registration failed!!!");
            return;
        }
        MessageBox.Show("Successful!");
    }
Beispiel #5
0
    protected void Button24_Click(object sender, EventArgs e)
    {
        hdbmsClass lib = new hdbmsClass();
        string     msg = "";
        //decimal subscriberID = lib.GenerateTransID(ref msg);

        string   patientID        = lblPatientName.Text;
        DateTime consultationDate = Convert.ToDateTime(dateConsultaion.Value);
        string   diagnosis        = diagnosisList.Text;
        string   investigations   = investigationsList.Text;
        string   prescriptions    = prescriptionsList.Text;
        string   remark           = txtRemark.Text;
        string   advice           = txtAdvice.Text;
        string   doctorID         = lblStaffID.Text;



        lib.insertDoctor_report_tbl(patientID, consultationDate, diagnosis, investigations, prescriptions, remark, advice, doctorID, ref msg);

        if (msg != "")
        {
            lblError.Text = "unable to update  doctors report as a result of " + msg;
            MessageBox.Show("Registration failed!!!");
            return;
        }
        MessageBox.Show("Successful!");
    }
Beispiel #6
0
    protected void btnCreateAccount_Click(object sender, EventArgs e)
    {
        // CODE TO CREATE/ADD NEW RECORD FOR MESSAGING:
        hdbmsClass lib         = new hdbmsClass();
        decimal    subID       = Convert.ToDecimal(scbsciberDropDownList1.SelectedValue);
        string     subName     = scbsciberDropDownList1.SelectedItem.ToString();
        string     staffID     = txtStaffID.Text;
        string     staffName   = txtStaffName.Text;
        string     username    = txtUsername.Text;
        string     nationality = dropNationality.SelectedItem.ToString();
        string     gender      = genderDropDownList2.SelectedItem.ToString();
        string     email       = txtEmail.Text;
        string     pwd         = txtPwd.Text;
        string     mobileNo    = txtMobileNo.Text;
        string     dept        = deptDropDownList3.SelectedItem.ToString();
        DateTime   regDate     = DateTime.Now;
        string     msg         = "";

        lib.insertMailRegTbl(subID, subName, staffID, staffName, gender, nationality, mobileNo, email, dept, username, pwd, regDate, ref msg);
        if (msg != "")
        {
            lblMsg.Text = "Unable to create new user as a result of " + msg;
            return;
        }
        MessageBox.Show("Messaging Account was created Successfully!!!");
    }
Beispiel #7
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        FileUpload1.SaveAs(Server.MapPath("Images").ToString() + @"\" + FileUpload1.FileName);
        PassportImg.ImageUrl = @"~\Images\" + FileUpload1.FileName;

        hdbmsClass lib  = new hdbmsClass();
        hdbmsClass lib2 = new hdbmsClass();
        string     msg  = "";

        //decimal subscriberID = lib.GenerateTransID(ref msg);
        decimal  subscriberID          = Convert.ToDecimal(lblSubscriberID.Text);
        string   subscriberName        = lblSubscriberName.Text;
        string   staffID               = txtStaffID.Text;
        string   staffName             = txtStaffName.Text;
        string   gender                = dropGender.Text;
        DateTime dob                   = Convert.ToDateTime(dateDOB.Value);
        string   nationality           = dropNationality.Text;
        string   state                 = dropState.Text;
        string   lg                    = dropLG.Text;
        string   address               = txtAddress.Text;
        string   correspondentAddress  = txtCorrespondent.Text;
        string   mobileNumber          = txtMobileNumber.Text;
        string   emailAddress          = txtEmailAddress.Text;
        string   department            = dropDepartment.Text;
        string   positionLevel         = dropPosition.Text;
        DateTime registrationDate      = Convert.ToDateTime(dateRegistration.Value);
        string   nextOfKin             = txtNOK.Text;
        string   nokRelationship       = dropNOKRel.Text;
        string   nokAddress            = txtNOKAddress.Text;
        string   nokMobileNumber       = txtNOKMobile.Text;
        string   highestDegreeObtained = dropDegree.Text;
        string   role                  = dropRole.Text;
        string   imageUrl              = PassportImg.ImageUrl;
        string   userName              = txtUsername.Text;
        string   password              = txtPassword.Text;


        lib.insertStaff_reg_tbl(subscriberID, subscriberName, staffID, staffName, gender, dob, nationality, state, lg, address, correspondentAddress, mobileNumber, emailAddress, department, positionLevel, registrationDate, nextOfKin, nokRelationship, nokAddress, nokMobileNumber, highestDegreeObtained, role, imageUrl, userName, password, ref msg);
        lib2.insertMail_reg_tbl(subscriberID, subscriberName, staffID, staffName, gender, nationality, department, mobileNumber, emailAddress, userName, password, ref msg);
        if (msg != "")
        {
            LblMessage.Text = "unable to register subscriber as a result of " + msg;
            MessageBox.Show("Registration failed!!!");
            return;
        }

        else
        {
            MessageBox.Show("Successful!");
            Response.Redirect("~/Registration_Module/Staff_Reg_Form.aspx");
        }
    }
Beispiel #8
0
 protected void btnMessage_Click(object sender, EventArgs e)
 {
     //insertMessaging_Tbl
     hdbmsClass lib = new hdbmsClass();
     string msg = "";
     string senderID = txtSenderID.Text;
     string recieverID = txtReceiverID.Text;
     string message = txtMessage.Text;
     DateTime msgDate = DateTime.Now;
     string department = "DEPARTMENT";
     string sub = "SUBSCRIBER";
     decimal subID =Convert.ToDecimal(234);
     lib.insertMessaging_Tbl(senderID, recieverID, message, msgDate, department, subID, sub, ref msg);
     if(msg!="")
     {
         MessageBox.Show("Unable to send message because "+ msg);
         return;
     }
     MessageBox.Show("Message Sent !!!");
 }
Beispiel #9
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (radAdmin.Checked == true)
        {
            hdbmsClass lib          = new hdbmsClass();
            DataSet    ds           = new DataSet();
            string     msg          = "";
            int        sn           = Convert.ToInt32(txtSN.Text);
            decimal    subscriberID = Convert.ToDecimal(txtSubscriberID.Text);

            ds = lib.fetchSubscriberBySN_subID(sn, subscriberID, ref msg);

            if (msg != "" || ds.Tables.Count == 0)
            {
                lblErrorMsg.Text = "unable to fetch subscriber as a result of " + msg;
                MessageBox.Show("Incorrect Details!!!");
                return;
            }

            Response.Redirect("~/Login_Module/Human_Resource_Page.aspx");
        }
        else if (radStaff.Checked == true)
        {
            hdbmsClass lib      = new hdbmsClass();
            DataSet    ds       = new DataSet();
            string     msg      = "";
            string     userName = txtSN.Text;
            string     password = txtSubscriberID.Text;

            ds = lib.fetchStaffByUsername_Password(userName, password, ref msg);

            if (msg != "" || ds.Tables.Count == 0)
            {
                lblErrorMsg.Text = "unable to fetch staff as a result of " + msg;
                MessageBox.Show("Incorrect Details!!!");
                return;
            }

            Response.Redirect("~/Staff_Module/Doctors_Form.aspx");
        }
    }
Beispiel #10
0
    protected void Button7_Click(object sender, EventArgs e)
    {
        hdbmsClass lib = new hdbmsClass();
        string     msg = "";
        //decimal subscriberID = lib.GenerateTransID(ref msg);

        string deptID   = txtDeptID.Text;
        string deptName = txtDeptName.Text;

        lib.insertDepartment_tbl(deptID, deptName, ref msg);

        if (msg != "")
        {
            lbl.Text = "unable to update department table as a result of " + msg;
            MessageBox.Show("Registration failed!!!");
            return;
        }
        MessageBox.Show("Successful!");

        txtDeptID.Text   = "";
        txtDeptName.Text = "";
    }
Beispiel #11
0
    protected void Button3_Click(object sender, EventArgs e)
    {
        hdbmsClass lib       = new hdbmsClass();
        DataSet    ds        = new DataSet();
        string     msg       = "";
        string     patientID = txtPatientID.Text;



        ds = lib.fetchPatientByID(patientID, ref msg);


        if (msg != "" || ds.Tables.Count == 0)
        {
            lblErrormsg.Text = "unable to fetch patient as a result of " + msg;
            MessageBox.Show("Incorrect Details!!!");
            return;
        }

        lblPatientName.Text = ds.Tables[0].Rows[0]["PATIENT_NAME"].ToString();
        txtGender.Text      = ds.Tables[0].Rows[0]["GENDER"].ToString();
    }
Beispiel #12
0
    protected void dropDiagnosis_SelectedIndexChanged(object sender, EventArgs e)
    {
        hdbmsClass lib = new hdbmsClass();
        DataSet    ds  = new DataSet();
        string     msg = "";

        string diagnosis = dropDiagnosis.SelectedItem.ToString();
        string symptoms  = symptomsTxt.Text;
        string treatment = txtTreatment.Text;

        ds = lib.fetchSymptomsByDisease(diagnosis, ref msg);

        if (msg != "")
        {
            lblError.Text = "unable to fetch treatment as a result of " + msg;
            MessageBox.Show("Error fetching treatment!!!");
            return;
        }

        symptomsTxt.Text  = ds.Tables[0].Rows[0]["SYMPTOMS"].ToString();
        txtTreatment.Text = ds.Tables[0].Rows[0]["TREATMENT"].ToString();
    }
Beispiel #13
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        hdbmsClass lib = new hdbmsClass();
        string     msg = "";
        //decimal subscriberID = lib.GenerateTransID(ref msg);

        string department = dropDept.Text;
        string services   = txtServices.Text;
        string price      = txtPrice.Text;

        lib.insertPrice_list_tbl(department, services, price, ref msg);

        if (msg != "")
        {
            lbl.Text = "unable to update price list as a result of " + msg;
            MessageBox.Show("Registration failed!!!");
            return;
        }
        MessageBox.Show("Successful!");

        txtServices.Text = "";
        txtPrice.Text    = "";
    }
Beispiel #14
0
    protected void Button4_Click(object sender, EventArgs e)
    {
        hdbmsClass lib      = new hdbmsClass();
        DataSet    ds       = new DataSet();
        string     msg      = "";
        string     userName = txtUsername.Text;
        string     password = txtPassword.Text;

        ds = lib.fetchStaffByUsername_Password(userName, password, ref msg);

        if (msg != "" || ds.Tables.Count == 0)
        {
            lblErrormsg.Text = "unable to fetch staff as a result of " + msg;
            MessageBox.Show("Incorrect Details!!!");
            return;
        }

        Panel3.Visible = false;
        Panel4.Visible = true;



        lblSubscriberName.Text = ds.Tables[0].Rows[0]["SUBSCRIBER_NAME"].ToString();
    }
Beispiel #15
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        hdbmsClass lib          = new hdbmsClass();
        DataSet    ds           = new DataSet();
        string     msg          = "";
        int        sn           = Convert.ToInt32(txtSN.Text);
        decimal    subscriberID = Convert.ToDecimal(txtSubscriberID.Text);

        ds = lib.fetchSubscriberBySN_subID(sn, subscriberID, ref msg);

        if (msg != "" || ds.Tables.Count == 0)
        {
            lblErrorMsg.Text = "unable to fetch subscriber as a result of " + msg;
            MessageBox.Show("Incorrect Details!!!");
            return;
        }

        Panel6.Visible          = true;
        Panel5.Visible          = false;
        lblSubscriberID.Text    = ds.Tables[0].Rows[0]["SUBSCRIBER_ID"].ToString();
        lblSubscriberName.Text  = ds.Tables[0].Rows[0]["SUBCRIBER_NAME"].ToString();
        lblSubscriberName0.Text = ds.Tables[0].Rows[0]["SUBCRIBER_NAME"].ToString();
        // string subscriberName = lblSubscriberName.Text;
    }
Beispiel #16
0
    protected void Button6_Click(object sender, EventArgs e)
    {
        hdbmsClass lib = new hdbmsClass();
        string     msg = "";
        //decimal subscriberID = lib.GenerateTransID(ref msg);

        string sections = dropSections.Text;
        string ward     = txtWard.Text;
        string room     = txtRoom.Text;
        string bed      = txtBed.Text;
        string status   = dropStatus.Text;



        lib.insertBed_ref_tbl(sections, ward, room, bed, status, ref msg);

        if (msg != "")
        {
            lbl.Text = "unable to update bed ref table as a result of " + msg;
            MessageBox.Show("Registration failed!!!");
            return;
        }
        MessageBox.Show("Successful!");
    }
    protected void Button3_Click(object sender, EventArgs e)
    {
        hdbmsClass lib = new hdbmsClass();
        string     msg = "";
        //decimal subscriberID = lib.GenerateTransID(ref msg);

        string diseases     = diseasesTxt.Text;
        string causingAgent = microbesTxt.Text;
        string causes       = causesTxt.Text;
        string symptoms     = symptomsTxt.Text;
        string treatment    = treatmentTxt.Text;



        lib.insertTreatment_Ref_Tbl(diseases, causingAgent, causes, symptoms, treatment, ref msg);

        if (msg != "")
        {
            lblMessage2.Text = "unable to update diseases/treatment table as a result of " + msg;
            MessageBox.Show("Registration failed!!!");
            return;
        }
        MessageBox.Show("Successful!");
    }
Beispiel #18
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        FileUpload2.SaveAs(Server.MapPath("Images").ToString() + @"\" + FileUpload2.FileName);
        PassportImg.ImageUrl = @"~\Images\" + FileUpload2.FileName;

        hdbmsClass lib = new hdbmsClass();
        string     msg = "";
        //decimal subscriberID = lib.GenerateTransID(ref msg);
        decimal  subscriberID     = Convert.ToDecimal(lblSubscriberID.Text);
        string   subscriberName   = lblSubscriberName.Text;
        string   patientID        = txtPatientID.Text;
        string   patientName      = txtPatientName.Text;
        string   gender           = dropGender.Text;
        DateTime dob              = Convert.ToDateTime(dateDOB.Value);
        string   nationality      = dropNationality.Text;
        string   state            = dropState.Text;
        string   lg               = dropLG.Text;
        string   address          = txtAddress.Text;
        string   mobileNumber     = txtMobileNumber.Text;
        string   emailAddress     = txtEmailAddress.Text;
        string   bloodGroup       = dropBloodGroup.Text;
        string   genotype         = dropGenotype.Text;
        DateTime registrationDate = Convert.ToDateTime(dateRegistration.Value);
        string   nextOfKin        = txtNOK.Text;
        string   nokRelationship  = dropNOKRel.Text;
        string   nokAddress       = txtNOKAddress.Text;
        string   nokMobileNumber  = txtNOKMobile.Text;
        string   staffIncharge    = lblStaffName.Text;
        DateTime dod              = Convert.ToDateTime(dateDOD.Value);
        string   imageUrl         = PassportImg.ImageUrl;


        lib.insertPatient_reg_tbl(subscriberID, subscriberName, patientID, patientName, gender, dob, nationality, state, lg, address, mobileNumber, emailAddress, bloodGroup, genotype, registrationDate, nextOfKin, nokRelationship, nokAddress, nokMobileNumber, staffIncharge, dod, imageUrl, ref msg);
        if (msg != "")
        {
            LblMessage.Text = "unable to register subscriber as a result of " + msg;
            MessageBox.Show("Registration failed!!!");
            return;
        }
        MessageBox.Show("Successfully Registered! You now have an ID");



        /*DataSet ds = new DataSet();
         *
         * string thepatientID = txtPatientID.Text;
         *
         *
         * ds = lib.fetchPatientByPatientID(thepatientID, ref msg);
         *
         * if (msg != "" || ds.Tables.Count == 0)
         * {
         *  lblErrormsg.Text = "unable to fetch patient details as a result of " + msg;
         *  MessageBox.Show("Incorrect Details!!!");
         *  return;
         * }
         *
         * Response.Redirect("~/Staff_Module/Patients_Form.aspx");
         *
         * lblPatientName.Text = ds.Tables[0].Rows[0]["PATIENT_NAME"].ToString();
         * lblPatientID.Text = ds.Tables[0].Rows[0]["PATIENT_ID"].ToString();
         * lblGender.Text = ds.Tables[0].Rows[0]["GENDER"].ToString();
         * lblPhoneNumber.Text = ds.Tables[0].Rows[0]["MOBILE_NUMBER"].ToString();
         * lblEmailAddress.Text = ds.Tables[0].Rows[0]["EMAIL_ADDRESS"].ToString();
         * lblBloodGroup.Text = ds.Tables[0].Rows[0]["BLOOD_GROUP"].ToString();
         */

        Response.Redirect("~/Staff_Module/Patients_Form.aspx");
    }