protected void btnsave_Click(object sender, EventArgs e)
    {
        string   name    = txtname.Text;
        int      age     = Int32.Parse(txtage.Text);
        string   dob     = Request.Form.Get("txtDOB");
        string   sex     = rdoListSex.SelectedValue;
        string   mstatus = rdoListMStatus.SelectedValue;
        string   addr    = txtaddr.Text;
        string   email   = txtemail.Text;
        string   city    = txtcity.Text;
        string   state   = txtstate.Text;
        string   phone   = txtphone.Text;
        string   mobile  = txtmobile.Text;
        string   docid   = Request.Form.Get("ddlDocName");
        DateTime dt      = DateTime.Now;
        String   appdate = Request.Form.Get("appDate");
        String   sql     = "insert into Doc_AppInfo (ClientName,Age,DOB,Sex,MStatus,Address," +
                           "Email,City,State,Phone,Mobile,DoctorID,AppDate,Regdate) values('" + name + "'," +
                           age + ",'" + dob + "','" + sex + "','" + mstatus + "','" + addr + "','" + email + "','" +
                           city + "','" + state + "','" + phone + "','" + mobile + "','" +
                           docid + "','" + appdate + "','" + dt + "')";
        int x = dbe.putData(sql);

        if (x > 0)
        {
            Response.Redirect("index.aspx?id=regc");
        }
        else
        {
            lblMsg.Text = "Appoinment registration failed";
        }
    }
Ejemplo n.º 2
0
    protected void btnDonate_Click(object sender, EventArgs e)
    {
        if (ddlDistrict.Text == "--Select--")
        {
            lblmsg.Text = "Please select a district";
            return;
        }
        if (ddlOrgon.Text == "--Select--")
        {
            lblmsg.Text = "Please select an orgon";
            return;
        }
        String dob = Request.Form.Get("txtDOB");
        String sql = "insert into Donation (DonorNAme,Sex,DOB,Contact,City,District,Orgon,Regdate) values('" +
                     txtName.Text + "','" + rdoSexList.SelectedValue + "','" + dob + "','" + txtPhno.Text + "','" +
                     txtCity.Text + "','" + ddlDistrict.Text + "','" + ddlOrgon.Text + "','" + DateTime.Now.ToShortDateString() + "')";
        int x = dbe.putData(sql);

        if (x > 0)
        {
            lblmsg.Text               = "Thank you for donating your orgon";
            txtName.Text              = "";
            rdoSexList.SelectedIndex  = 0;
            ddlOrgon.SelectedIndex    = 0;
            ddlDistrict.SelectedIndex = 0;
            txtPhno.Text              = "";
            txtCity.Text              = "";
            txtAddress.Text           = "";
        }
        else
        {
            lblmsg.Text = "Registration failed";
        }
    }
Ejemplo n.º 3
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        String dob = Request.Form.Get("txtDOB");

        if (txtDocName.Text == "" || txtAge.Text == "" || txtOnline_from.Text == "" || txtOnline_to.Text == "" || dob == "")
        {
            lblempty.Text = "Some required fields missing";
            return;
        }
        String dname = txtDocName.Text;
        String age   = txtAge.Text;
        String mstatus;

        if (rdoSingle.Checked == true)
        {
            mstatus = "Single";
        }
        else
        {
            mstatus = "Maried";
        }
        String sex;

        if (rdoMale.Checked == true)
        {
            sex = "Male";
        }
        else
        {
            sex = "Female";
        }
        String  spec        = ddlSpec.Text;
        String  qlfn        = ddlQlfn.Text;
        String  con_from    = txtConsult_from.Text;
        String  con_to      = txtConsult_to.Text;
        String  online_from = txtOnline_from.Text;
        String  online_to   = txtOnline_to.Text;
        String  regdate     = DateTime.Now.ToShortDateString();
        String  sql         = "select ID,hosp_name from hosp_reg where Username='******'";
        DataSet ds          = dbe.getData(sql);
        String  hospID      = ds.Tables[0].Rows[0]["ID"].ToString();
        String  hospName    = ds.Tables[0].Rows[0]["hosp_name"].ToString();

        sql = "insert into Hosp_DoctorsList(DoctorName,Age,DOB,Sex,Qualification,Specialization,MStatus," +
              "Consult_From,Consult_To,Online_From,Online_To,HospitalName,HospitalID,Regdate) values('" + dname +
              "'," + age + ",'" + dob + "','" + sex + "','" + qlfn + "','" + spec + "','" + mstatus + "','" +
              con_from + "','" + con_to + "','" + online_from + "','" + online_to + "','" + hospName + "'," +
              hospID + ",'" + regdate + "')";
        int x = dbe.putData(sql);

        if (x > 0)
        {
            Response.Redirect("hosphome.aspx?id=0");
        }
        else
        {
            lblErmsg.Text = "Submision operation failed";
        }
    }
Ejemplo n.º 4
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (txtPassword.Text == "" || txtCity.Text == "" || txtNum.Text == "" || txtPhone.Text == "" ||
            txtZIP.Text == "" || txtState.Text == "" || txtStreet.Text == "" || txtUsername.Text == "")
        {
            lblMsg.Text = "Some required fields missing";
            return;
        }
        string hname    = txtHospName.Text;
        string num      = txtNum.Text;
        string address  = txtAddress.Text;
        string astreet  = txtStreet.Text;
        string astate   = txtState.Text;
        string acity    = txtCity.Text;
        string azip     = txtZIP.Text;
        string hphone   = txtPhone.Text;
        string pref     = txtDispName.Text;
        string username = txtUsername.Text;
        string passwd   = txtPassword.Text;


        String sql = "insert into hosp_reg (hosp_name,number,Address,street,city,state,ZIP,hospital_phone," +
                     "prefered_name,Username,Regdate) values('" + hname + "','" + num + "','" + address + "','" + astreet +
                     "','" + acity + "','" + astate + "','" + azip + "','" + hphone + "','" +
                     pref + "','" + username + "','" + DateTime.Now.ToString() + "')";
        int x = dbe.putData(sql);

        sql = "insert into login values('" + username + "','" + passwd + "','hospital')";
        int y = dbe.putData(sql);

        if (x > 0 && y > 0)
        {
            Response.Redirect("index.aspx?id=regc");
        }
        else
        {
            lblErmsg.Text = "Registeration Failed";
        }
    }
Ejemplo n.º 5
0
    protected void btnRegister_Click(object sender, ImageClickEventArgs e)
    {
        if (ddlDistrict.Text == "--Select--")
        {
            lblDistMsg.Text = "Select a district";
            return;
        }
        else
        {
            lblDistMsg.Text = "";
        }
        if (ddlState.Text == "--Select--")
        {
            lblStateMsg.Text = "Select a state";
            return;
        }
        else
        {
            lblStateMsg.Text = "";
        }
        if (ddlBloodGroup.Text == "--Select--")
        {
            lblBgMSg.Text = "Select a blood group";
            return;
        }
        else
        {
            lblBgMSg.Text = "";
        }
        String dname    = txtName.Text;
        String sex      = ddlSex.Text;
        int    age      = Int32.Parse(ddlAge.Text);
        String dobStr   = Request.Form.Get("txtDOB").ToString();
        String add1     = txtAddress1.Text;
        String add2     = txtAddress2.Text;
        String dist     = ddlDistrict.Text;
        String state    = ddlState.Text;
        String phone    = txtPhone.Text;
        String mobile   = txtMobile.Text;
        String bloodgrp = ddlBloodGroup.SelectedValue;
        String sql      = "Insert into BloodDonation (DonorName, Sex,Age,DOB,Address1,Address2,District,State,Phone,Mobile," +
                          "BloodGroup) values('" + dname + "','" + sex + "'," + age + ",'" + dobStr + "','" + add1 + "','" + add2 + "','" + dist +
                          "','" + state + "','" + phone + "','" + mobile + "','" + bloodgrp + "')";
        int x = dbe.putData(sql);

        if (x > 0)
        {
            //lblMsg.Text = "You have registered successfully";
            Response.Redirect("index.aspx?id=regc");
        }
    }
    protected void btnPost_Click(object sender, EventArgs e)
    {
        String sql = "Insert into ConsultInfo (Name,Email,Description,CDate ) values('" + txtName.Text +
                     "','" + txtEmail.Text + "','" + txtDesc.Text + "','" + DateTime.Now.ToShortDateString() + "')";
        int x = dbe.putData(sql);

        if (x > 0)
        {
            lblmsg.Text   = "Your question posted successfully";
            txtDesc.Text  = "";
            txtEmail.Text = "";
            txtName.Text  = "";
        }
        else
        {
            lblmsg.Text = "Error on posting question";
        }
    }
    protected void btnRegister_Click(object sender, EventArgs e)
    {
        if (ddlDistrict.Text == "--Select--")
        {
            lblmsg.Text = "Select a valid district name";
            return;
        }
        String sql = "Insert into  AmbulanceService  (Provider,Address,Phone,Mobile,City,District,Email) values('" +
                     txtProvider.Text + "','" + txtAddress.Text + "','" + txtPhone.Text + "','" + txtMobile.Text + "','" +
                     txtCity.Text + "','" + ddlDistrict.SelectedValue + "','" + txtEmail.Text + "')";
        int x = dbe.putData(sql);

        if (x > 0)
        {
            Response.Redirect("index.aspx?id=amb");
        }
        else
        {
            lblmsg.Text = "Error on registration process";
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        String   pname   = txtname.Text;
        String   age     = txtage.Text;
        String   dob     = Request.Form.Get("txtDOB");
        String   sex     = rdoListSex.SelectedValue;
        String   mstatus = rdoListMStatus.SelectedValue;
        String   addr    = txtaddr.Text;
        String   email   = txtemail.Text;
        String   city    = txtcity.Text;
        String   state   = txtstate.Text;
        String   phone   = txtphone.Text;
        String   mobile  = txtmobile.Text;
        String   pincode = txtpin.Text;
        String   spec    = ddlSpec.SelectedValue;
        String   hospid  = Request.Form.Get("ddlHospName");
        String   docname = Request.Form.Get("ddlDocName");
        String   appDate = Request.Form.Get("appDate");
        DateTime dt      = DateTime.Now;

        if (dob == "" || appDate == "" || hospid == "--Select--" || docname == "--Select--" || spec == "--Select--")
        {
            lblMsg.Text = "Some required fields missing";
            return;
        }
        String sql = "insert into Hosp_Appnfo (ClientName,Age,DOB,Sex,MStatus,Address,Email,City,State," +
                     "Phone,Mobile,Pin,HospitalID,DoctorName,AppDate,Regdate) values('" + pname + "'," + age + ",'" + dob +
                     "','" + sex + "','" + mstatus + "','" + addr + "','" + email + "','" + city + "','" + state + "','" +
                     phone + "','" + mobile + "','" + pincode + "'," + hospid + ",'" + docname + "','" + appDate + "','" + dt + "')";
        int x = dbe.putData(sql);

        if (x > 0)
        {
            Response.Redirect("index.aspx?id=regc");
        }
        else
        {
            lblMsg.Text = "Appoinment registration failed";
        }
    }
Ejemplo n.º 9
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        string dname    = txtDocName.Text;
        string dob      = Request.Form.Get("txtDOB");
        string addr_no  = txtNum.Text;
        string street   = txtStreet.Text;
        string city     = txtCity.Text;
        string state    = txtState.Text;
        string zip      = txtZIP.Text;
        string con_from = txtConsult_from.Text;
        string con_to   = txtConsult_to.Text;
        string onl_from = txtOnline_from.Text;
        string onl_to   = txtOnline_to.Text;
        string qual     = ddlQlfn.SelectedItem.ToString();
        string spec     = ddlSpec.SelectedItem.ToString();
        string sex      = "";
        string username = txtUsername.Text;
        string passwd   = txt_password.Text;

        if (rdoFemale.Checked == true)
        {
            sex = "Female";
        }
        else if (rdoMale.Checked == true)
        {
            sex = "Male";
        }
        string mstatus = "";

        if (rdoMarried.Checked == true)
        {
            mstatus = "Married";
        }
        else if (rdoSingle.Checked == true)
        {
            mstatus = "single";
        }
        if (txt_password.Text == "" || txtAge.Text == "" || txtCity.Text == "" ||
            txtConsult_from.Text == "" || txtConsult_to.Text == "" || dob == "" || txtDocName.Text == "" ||
            txtNum.Text == "" || txtOnline_from.Text == "" || txtOnline_to.Text == "" || txtPhone.Text == "" ||
            txtState.Text == "" || txtStreet.Text == "" || txtUsername.Text == "" || txtZIP.Text == "")
        {
            lblempty.Text = "Some required fields missing";
            return;
        }
        else
        {
            int    age   = Int32.Parse(txtAge.Text);
            String phone = txtPhone.Text;
            String sql   = "insert into doc_reg (Doctor_name,age,Qualification,specialization,sex,DOB,maritalstatus,addr_number," +
                           "Street,city,state,Zip,phone,consult_from,consult_to,online_from,online_to,Username,Regdate) values('" +
                           dname + "'," + age + ",'" + qual + "','" + spec + "','" + sex + "','" + dob + "','" + mstatus + "','" + addr_no + "','" +
                           street + "','" + city + "','" + state + "','" + zip + "'," + phone + ",'" + con_from + "','" +
                           con_to + "','" + onl_from + "','" + onl_to + "','" + username + "','" + DateTime.Now.ToString() + "')";
            int x = dbe.putData(sql);

            int y = dbe.putData("insert into login values('" + username + "','" + passwd + "','doctor')");
            if (x > 0 && y > 0)
            {
                Response.Redirect("index.aspx?id=regc");
            }
            else
            {
                lblErmsg.Text = "Registeration Failed";
            }
        }
    }