protected void btnAutority_Command(object sender, CommandEventArgs e)
        {
            int        ID        = Convert.ToInt32(e.CommandArgument);
            Check      chk       = new Check();
            string     Authority = chk.stringCheck("select Authority from HospitalRegistation where ID=" + ID + "");
            SqlCommand cmd       = new SqlCommand();

            cmd.Connection = con;
            if (Authority == "TRUE")
            {
                RandomNumberGenarator rn = new RandomNumberGenarator();
                rn.ResultDate   = 5;
                cmd.CommandText = "update HospitalRegistation set Authority='" + rn.RandomStringNumber("Authority") + "' where ID=" + ID + "";
                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
                ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('Authority is Dectived.');", true);
            }
            else
            {
                cmd.CommandText = "update HospitalRegistation set Authority='TRUE' where ID=" + ID + "";
                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
                ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('Authority is Actived.');", true);
            }
            con.Open();
            SqlCommand    cmd2 = new SqlCommand("select * from HospitalRegistation where ID=" + ID, con);
            SqlDataReader dr   = cmd2.ExecuteReader();

            GridView1.DataSource = dr;
            GridView1.DataBind();
            con.Close();
        }
Exemplo n.º 2
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            string Doctor_ID = Request.QueryString["Edit"].ToString();
            var    shortCut  = " from DoctorRegistation where DoctorID='" + Doctor_ID + "'";
            Check  chk       = new Check();

            if (ddlGender.SelectedValue != "0")
            {
                lblResult.Text = "";
                SqlCommand cmd = new SqlCommand();
                cmd.Connection  = con;
                cmd.CommandText = @"update DoctorRegistation set FullName=@FullName,Qualification=@Qualification,Designation=@Designation,Categories=@Categories,Expertise=@Expertise,RegistationNumber=@RegistationNumber,PresentProfession=@PresentProfession,Gender=@Gender,Country=@Country,Division=@Division,District=@District,Upazila=@Upazila,NID=@NID,Mobile=@Mobile,Telephone=@Telephone,Email=@Email,Username=@Username,Password=@Password,Address=@Address,DoctorPhoto=@DoctorPhoto,DoctorLicensePhoto=@DoctorLicensePhoto,Date=@Date,Month=@Month,Year=@Year,IssuDate=@IssuDate,Authorise=@Authorise,LoginParmit=@LoginParmit,Verify=@Verify,Owner=@Owner,Command=@Command,DoctorDetails=@DoctorDetails where DoctorID='" + Doctor_ID + "'";
                RandomNumberGenarator rn = new RandomNumberGenarator();
                rn.ResultDate = 10;
                string DoctorID = rn.RandomStringNumber("DoctorID");
                cmd.Parameters.AddWithValue("@FullName", txtDoctorFullName.Text);
                cmd.Parameters.AddWithValue("@Qualification", txtQualification.Text);
                cmd.Parameters.AddWithValue("@Designation", txtDesignation.Text);
                cmd.Parameters.AddWithValue("@Categories", ddlDoctorCatagoris.SelectedItem.ToString());
                cmd.Parameters.AddWithValue("@Expertise", txtExpertise.Text);
                cmd.Parameters.AddWithValue("@RegistationNumber", txtRegistationNumber.Text);
                cmd.Parameters.AddWithValue("@PresentProfession", txtPresentProfession.Text);
                cmd.Parameters.AddWithValue("@Gender", ddlGender.SelectedItem.ToString());
                string Country  = "";
                string Division = "";
                string District = "";
                string Upazila  = "";
                if (ddlCountry.SelectedValue != "0" && ddlDistrict.SelectedValue != "0" && ddlDvision.SelectedValue != "0" && ddlUpazila.SelectedValue != "0")
                {
                    Country  = ddlCountry.SelectedItem.ToString();
                    Division = ddlDvision.SelectedItem.ToString();
                    District = ddlDistrict.SelectedItem.ToString();
                    Upazila  = ddlUpazila.SelectedItem.ToString();
                }
                else
                {
                    Country  = chk.stringCheck("select Country " + shortCut);
                    Division = chk.stringCheck("select Division " + shortCut);
                    District = chk.stringCheck("select District " + shortCut);
                    Upazila  = chk.stringCheck("select Upazila " + shortCut);
                }
                cmd.Parameters.AddWithValue("@Country", Country);
                cmd.Parameters.AddWithValue("@Division", Division);
                cmd.Parameters.AddWithValue("@District", District);
                cmd.Parameters.AddWithValue("@Upazila", Upazila);

                cmd.Parameters.AddWithValue("@NID", txtNID.Text);
                cmd.Parameters.AddWithValue("@Mobile", txtDoctorMobile.Text);
                cmd.Parameters.AddWithValue("@Telephone", txtDoctorTelephone.Text);
                cmd.Parameters.AddWithValue("@Email", txtDoctorEmail.Text);
                cmd.Parameters.AddWithValue("@Username", txtDoctorUserName.Text);
                cmd.Parameters.AddWithValue("@Password", txtDoctorPassword.Text);
                cmd.Parameters.AddWithValue("@Address", txtDoctorAddress.Text);
                if (FileUploadDoctorImage.HasFile)
                {
                    string Name     = DateTime.Now.ToString("dd-MM-yyyy-hh-mm-ss");
                    string Ext      = "";
                    string FileName = Path.GetExtension(FileUploadDoctorImage.FileName.ToLower());
                    if (FileName == ".jpg")
                    {
                        Ext = ".jpg";
                    }
                    else if (FileName == ".jpeg")
                    {
                        Ext = ".jpeg";
                    }
                    else if (FileName == ".png")
                    {
                        Ext = ".png";
                    }
                    else
                    {
                        lblResult.ForeColor = Color.Red;
                        lblResult.Text     += "Doctor Image Upload (.jpg, .jpeg, .png)";
                    }
                    if (Ext != "")
                    {
                        cmd.Parameters.AddWithValue("@DoctorPhoto", Name + Ext);
                        FileUploadDoctorImage.SaveAs(Server.MapPath("../Doctor/Temp/" + Name + Ext));
                        doctor.Login log = new Login();
                        log.ImageEdit(Name, Ext);
                    }
                }
                else
                {
                    cmd.Parameters.AddWithValue("@DoctorPhoto", chk.stringCheck("select DoctorPhoto from DoctorRegistation where DoctorID='" + Doctor_ID + "'"));
                }
                if (FileUploadDoctorLicenceInage.HasFile)
                {
                    string Name     = DateTime.Now.ToString("dd-MM-yyyy-hh-mm-ss");
                    string Ext      = "";
                    string FileName = Path.GetExtension(FileUploadDoctorLicenceInage.FileName.ToLower());
                    if (FileName == ".jpg")
                    {
                        Ext = ".jpg";
                    }
                    else if (FileName == ".jpeg")
                    {
                        Ext = ".jpeg";
                    }
                    else if (FileName == ".png")
                    {
                        Ext = ".png";
                    }
                    else
                    {
                        lblResult.ForeColor = Color.Red;
                        lblResult.Text     += "Doctor licence Upload (.jpg, .jpeg, .png)";
                    }
                    if (Ext != "")
                    {
                        cmd.Parameters.AddWithValue("@DoctorLicensePhoto", FileName + Ext);
                        FileUploadDoctorLicenceInage.SaveAs(Server.MapPath("../Doctor/LicenceImage/" + FileName + Ext));
                    }
                }
                else
                {
                    cmd.Parameters.AddWithValue("@DoctorLicensePhoto", chk.stringCheck("select DoctorLicensePhoto from DoctorRegistation where DoctorID='" + Doctor_ID + "' "));
                }

                cmd.Parameters.AddWithValue("@Date", Convert.ToInt32(DateTime.Now.ToString("dd")));
                cmd.Parameters.AddWithValue("@Month", Convert.ToInt32(DateTime.Now.ToString("MM")));
                cmd.Parameters.AddWithValue("@Year", Convert.ToInt32(DateTime.Now.ToString("yyyy")));
                cmd.Parameters.AddWithValue("@IssuDate", DateTime.Now.ToString());
                if (chkAuthority.Checked == true)
                {
                    cmd.Parameters.AddWithValue("@Authorise", "TRUE");
                }
                else
                {
                    rn.ResultDate = 5;
                    cmd.Parameters.AddWithValue("@Authorise", rn.RandomStringNumber("Authority"));
                }
                if (chkLoginPermit.Checked == true)
                {
                    cmd.Parameters.AddWithValue("@LoginParmit", "TRUE");
                }
                else
                {
                    cmd.Parameters.AddWithValue("@LoginParmit", "FALSE");
                }
                if (chkVerify.Checked == true)
                {
                    cmd.Parameters.AddWithValue("@Verify", "TRUE");
                }
                else
                {
                    cmd.Parameters.AddWithValue("@Verify", "FALSE");
                }
                cmd.Parameters.AddWithValue("@Owner", "Admin");
                cmd.Parameters.AddWithValue("@Command", "N/A");
                cmd.Parameters.AddWithValue("@DoctorDetails", " ");
                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
                lblResult.ForeColor = Color.Green;
                lblResult.Text      = "Update Registaion.";
            }
            else
            {
                lblResult.ForeColor = Color.Red;
                lblResult.Text     += "select all from's.";
            }
        }
Exemplo n.º 3
0
        protected void btnDoctorRegistaion_Click(object sender, EventArgs e)
        {
            if (ddlCountry.SelectedValue != "0" && ddlDistrict.SelectedValue != "0" && ddlDvision.SelectedValue != "0" && ddlGender.SelectedValue != "0" && ddlUpazila.SelectedValue != "0" && txtDesignation.Text != "" && txtDoctorAddress.Text != "" && txtDoctorEmail.Text != "" && txtDoctorFullName.Text != "" && txtDoctorMobile.Text != "" && txtExpertise.Text != "" && txtNID.Text != "" && txtPresentProfession.Text != "" && txtQualification.Text != "" && txtRegistationNumber.Text != "")
            {
                lblResult.Text = "";
                SqlCommand cmd = new SqlCommand();
                cmd.Connection  = con;
                cmd.CommandText = @"insert into DoctorRegistation (DoctorID,FullName,Qualification,Designation,Categories,Expertise,RegistationNumber,PresentProfession,Gender,Country,Division,District,Upazila,NID,Mobile,Telephone,Email,Username,Password,Address,DoctorPhoto,DoctorLicensePhoto,Date,Month,Year,IssuDate,Authorise,LoginParmit,Verify,Owner,Command,DoctorDetails)
    values(@DoctorID,@FullName,@Qualification,@Designation,@Categories,@Expertise,@RegistationNumber,@PresentProfession,@Gender,@Country,@Division,@District,@Upazila,@NID,@Mobile,@Telephone,@Email,@Username,@Password,@Address,@DoctorPhoto,@DoctorLicensePhoto,@Date,@Month,@Year,@IssuDate,@Authorise,@LoginParmit,@Verify,@Owner,@Command,@DoctorDetails)";
                RandomNumberGenarator rn = new RandomNumberGenarator();
                rn.ResultDate = 10;
                string DoctorID = rn.RandomStringNumber("DoctorID");
                cmd.Parameters.AddWithValue("@DoctorID", DoctorID);
                cmd.Parameters.AddWithValue("@FullName", txtDoctorFullName.Text);
                cmd.Parameters.AddWithValue("@Qualification", txtQualification.Text);
                cmd.Parameters.AddWithValue("@Designation", txtDesignation.Text);
                cmd.Parameters.AddWithValue("@Categories", ddlDoctorCatagoris.SelectedItem.ToString());
                cmd.Parameters.AddWithValue("@Expertise", txtExpertise.Text);
                cmd.Parameters.AddWithValue("@RegistationNumber", txtRegistationNumber.Text);
                cmd.Parameters.AddWithValue("@PresentProfession", txtPresentProfession.Text);
                cmd.Parameters.AddWithValue("@Gender", ddlGender.SelectedItem.ToString());

                cmd.Parameters.AddWithValue("@Country", ddlCountry.SelectedItem.ToString());
                cmd.Parameters.AddWithValue("@Division", ddlDistrict.SelectedItem.ToString());
                cmd.Parameters.AddWithValue("@District", ddlDistrict.SelectedItem.ToString());
                cmd.Parameters.AddWithValue("@Upazila", ddlUpazila.SelectedItem.ToString());

                cmd.Parameters.AddWithValue("@NID", txtNID.Text);
                cmd.Parameters.AddWithValue("@Mobile", txtDoctorMobile.Text);
                cmd.Parameters.AddWithValue("@Telephone", txtDoctorTelephone.Text);
                cmd.Parameters.AddWithValue("@Email", txtDoctorEmail.Text);
                cmd.Parameters.AddWithValue("@Username", txtDoctorUserName.Text);
                cmd.Parameters.AddWithValue("@Password", txtDoctorPassword.Text);
                cmd.Parameters.AddWithValue("@Address", txtDoctorAddress.Text);
                if (FileUploadDoctorImage.HasFile)
                {
                    string Name     = DateTime.Now.ToString("dd-MM-yyyy-hh-mm-ss");
                    string Ext      = "";
                    string FileName = Path.GetExtension(FileUploadDoctorImage.FileName.ToLower());
                    if (FileName == ".jpg")
                    {
                        Ext = ".jpg";
                    }
                    else if (FileName == ".jpeg")
                    {
                        Ext = ".jpeg";
                    }
                    else if (FileName == ".png")
                    {
                        Ext = ".png";
                    }
                    else
                    {
                        lblResult.ForeColor = Color.Red;
                        lblResult.Text     += "Doctor Image Upload (.jpg, .jpeg, .png)";
                    }
                    if (Ext != "")
                    {
                        cmd.Parameters.AddWithValue("@DoctorPhoto", FileName + Ext);
                        FileUploadDoctorImage.SaveAs(Server.MapPath("../Doctor/Temp/" + FileName + Ext));
                        doctor.Login log = new Login();
                        log.ImageEdit(FileName, Ext);
                    }
                }
                else
                {
                    if (ddlGender.SelectedValue == "Male")
                    {
                        cmd.Parameters.AddWithValue("@DoctorPhoto", "MaleProfile.jpg");
                    }
                    else
                    {
                        cmd.Parameters.AddWithValue("@DoctorPhoto", "FemaleProfile.jpg");
                    }
                }
                if (FileUploadDoctorLicenceInage.HasFile)
                {
                    string Name     = DateTime.Now.ToString("dd-MM-yyyy-hh-mm-ss");
                    string Ext      = "";
                    string FileName = Path.GetExtension(FileUploadDoctorLicenceInage.FileName.ToLower());
                    if (FileName == ".jpg")
                    {
                        Ext = ".jpg";
                    }
                    else if (FileName == ".jpeg")
                    {
                        Ext = ".jpeg";
                    }
                    else if (FileName == ".png")
                    {
                        Ext = ".png";
                    }
                    else
                    {
                        lblResult.ForeColor = Color.Red;
                        lblResult.Text     += "Doctor licence Upload (.jpg, .jpeg, .png)";
                    }
                    if (Ext != "")
                    {
                        cmd.Parameters.AddWithValue("@DoctorPhoto", FileName + Ext);
                        FileUploadDoctorLicenceInage.SaveAs(Server.MapPath("../Doctor/LicenceImage/" + FileName + Ext));
                    }
                }
                else
                {
                    cmd.Parameters.AddWithValue("@DoctorLicensePhoto", "N/A");
                }


                cmd.Parameters.AddWithValue("@Date", Convert.ToInt32(DateTime.Now.ToString("dd")));
                cmd.Parameters.AddWithValue("@Month", Convert.ToInt32(DateTime.Now.ToString("MM")));
                cmd.Parameters.AddWithValue("@Year", Convert.ToInt32(DateTime.Now.ToString("yyyy")));
                cmd.Parameters.AddWithValue("@IssuDate", DateTime.Now.ToString());
                if (chkAuthority.Checked == true)
                {
                    cmd.Parameters.AddWithValue("@Authorise", "TRUE");
                }
                else
                {
                    rn.ResultDate = 5;
                    cmd.Parameters.AddWithValue("@Authorise", rn.RandomStringNumber("Authority"));
                }
                if (chkLoginPermit.Checked == true)
                {
                    cmd.Parameters.AddWithValue("@LoginParmit", "TRUE");
                }
                else
                {
                    cmd.Parameters.AddWithValue("@LoginParmit", "FALSE");
                }
                if (chkVerify.Checked == true)
                {
                    cmd.Parameters.AddWithValue("@Verify", "TRUE");
                }
                else
                {
                    cmd.Parameters.AddWithValue("@Verify", "FALSE");
                }
                cmd.Parameters.AddWithValue("@Owner", "Admin");
                cmd.Parameters.AddWithValue("@Command", "N/A");
                cmd.Parameters.AddWithValue("@DoctorDetails", " ");
                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
                lblResult.ForeColor = Color.Green;
                lblResult.Text      = "Sucessfully Registaion.";
            }
            else
            {
                lblResult.ForeColor = Color.Red;
                lblResult.Text     += "select all from's.";
            }
        }
Exemplo n.º 4
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            if (ddlExprience.SelectedValue != "0" && ddlHospitalShift.SelectedValue != "0" && ddlHospitalType.SelectedValue != "0" && ddlOwnerApproval.SelectedValue != "0" && ddlPersonalGender.SelectedValue != "0" && ddlWorkHere.SelectedValue != "0")
            {
                string Hospital_ID = Request.QueryString["Edit"].ToString();
                Check  chk         = new Check();
                var    sortcut     = " from HospitalRegistation where HospitalID='" + Hospital_ID + "'";

                btnUpdate.Visible = true;
                btnHospitalRegistation.Visible = false;
                string Country  = "";
                string Division = "";
                string District = "";
                string Upazilla = "";
                if (ddlCountry.SelectedValue != "0" && ddlDistrict.SelectedValue != "0" && ddlDvision.SelectedValue != "0" && ddlUpazila.SelectedValue != "0")
                {
                    Country  = ddlCountry.SelectedItem.ToString();
                    Division = ddlDvision.SelectedItem.ToString();
                    District = ddlDistrict.SelectedItem.ToString();
                    Upazilla = ddlUpazila.SelectedItem.ToString();
                }
                else
                {
                    Country  = chk.stringCheck("select Country " + sortcut);
                    Division = chk.stringCheck("select Division " + sortcut);
                    District = chk.stringCheck("select District " + sortcut);
                    Upazilla = chk.stringCheck("select Upazilla " + sortcut);
                }
                SqlCommand cmd = new SqlCommand();
                cmd.Connection  = con;
                cmd.CommandText = @"insert into HospitalRegistation (HospitalID,Country,Division,District,Upazilla,HospitalCategory,HospitalType,HospitalShift,RegistationNumber,HospitalName,HospitalWebsite,HospitalEmail,HospitalMoblile,HospitalAddress,OwnerName,OwnerMobile,OwnerApproval,PersonalFullname,PersonalEmail,PersonalMoblie,username,password,NID,WorkHere,Experience,PersonalAddress,Gender,PersonalPhoto,OwnerPhoto,LicencePhoto,HospitalPhoto,Authority,LoginParmit,Verify,Command,Date,Month,Year,IssuDate,Owner)
                (@HospitalID,@Country,@Division,@District,@Upazilla,@HospitalCategory,@HospitalType,@HospitalShift,@RegistationNumber,@HospitalName,@HospitalWebsite,@HospitalEmail,@HospitalMoblile,@HospitalAddress,@OwnerName,@OwnerMobile,@OwnerApproval,@PersonalFullname,@PersonalEmail,@PersonalMoblie,@username,@password,@NID,@WorkHere,@Experience,@PersonalAddress,@Gender,@PersonalPhoto,@OwnerPhoto,@LicencePhoto,@HospitalPhoto,@Authority,@LoginParmit,@Verify,@Command,@Date,@Month,@Year,@IssuDate,@Owner)";
                RandomNumberGenarator rn = new RandomNumberGenarator();
                rn.ResultDate = 15;
                lblHostipalResult.ForeColor = Color.Red;
                int err = 0;
                cmd.Parameters.AddWithValue("@HospitalID", rn.RandomStringNumber("HospitalID"));
                cmd.Parameters.AddWithValue("@Country", Country);
                cmd.Parameters.AddWithValue("@Division", Division);
                cmd.Parameters.AddWithValue("@District", District);
                cmd.Parameters.AddWithValue("@Upazilla", Upazilla);
                cmd.Parameters.AddWithValue("@HospitalCategory", ddlHostipal.SelectedItem.ToString());
                cmd.Parameters.AddWithValue("@HospitalType", ddlHospitalType.SelectedItem.ToString());
                cmd.Parameters.AddWithValue("@HospitalShift", ddlHospitalShift.SelectedItem.ToString());
                cmd.Parameters.AddWithValue("@RegistationNumber", txtHospitalRegNumber.Text);
                cmd.Parameters.AddWithValue("@HospitalName", txtHospitalName.Text);
                cmd.Parameters.AddWithValue("@HospitalWebsite", txtHospitalWebsite.Text);
                cmd.Parameters.AddWithValue("@HospitalEmail", txtHospitalEmail.Text);
                cmd.Parameters.AddWithValue("@HospitalMoblile", txtHospitalMoblie.Text);
                cmd.Parameters.AddWithValue("@HospitalAddress", txtHospitalAddress.Text);
                cmd.Parameters.AddWithValue("@OwnerName", txtHospitalOwnerFullname.Text);
                cmd.Parameters.AddWithValue("@OwnerMobile", txtHospitalOwnerMobile.Text);
                cmd.Parameters.AddWithValue("@OwnerApproval", ddlOwnerApproval.Text);
                cmd.Parameters.AddWithValue("@PersonalFullname", txt_H_P_Fullname.Text);
                cmd.Parameters.AddWithValue("@PersonalEmail", txt_H_P_Email.Text);
                cmd.Parameters.AddWithValue("@PersonalMoblie", txt_H_P_Mobile.Text);
                cmd.Parameters.AddWithValue("@username", txt_H_P_UserName.Text);
                cmd.Parameters.AddWithValue("@password", txt_H_P_Password.Text);
                cmd.Parameters.AddWithValue("@NID", txt_H_P_NID.Text);
                cmd.Parameters.AddWithValue("@WorkHere", ddlWorkHere.SelectedItem.ToString());
                cmd.Parameters.AddWithValue("@Experience", ddlExprience.SelectedItem.ToString());
                cmd.Parameters.AddWithValue("@PersonalAddress", txt_H_P_Address.Text);
                cmd.Parameters.AddWithValue("@Gender", ddlPersonalGender.SelectedItem.ToString());
                if (FileUploadPersonalPhoto.HasFile)
                {
                    string ext     = "";
                    string FileExt = Path.GetExtension(FileUploadPersonalPhoto.FileName.ToLower());
                    if (FileExt == ".jpg")
                    {
                        ext = ".jpg";
                    }
                    else if (FileExt == ".jpeg")
                    {
                        ext = ".jpeg";
                    }
                    else if (FileExt == ".png")
                    {
                        ext = ".png";
                    }
                    else
                    {
                        err++;
                        lblHostipalResult.Text += "Personal Photo upload (.jpg, .jpeg, .png)";
                    }
                    if (ext != "")
                    {
                        string Name = DateTime.Now.ToString("dd-MM-yyyy-hh-mm-ss");
                        cmd.Parameters.AddWithValue("@PersonalPhoto", Name + ext);
                        FileUploadPersonalPhoto.SaveAs(Server.MapPath("../Hospital/Temp/" + Name + ext));
                        PersonalEdit(Name + ext);
                    }
                }
                else
                {
                    cmd.Parameters.AddWithValue("@PersonalPhoto", chk.stringCheck("select PersonalPhoto " + sortcut));
                }
                if (FileUploadOwnerPhoto.HasFile)
                {
                    string ext     = "";
                    string FileExt = Path.GetExtension(FileUploadOwnerPhoto.FileName.ToLower());
                    if (FileExt == ".jpg")
                    {
                        ext = ".jpg";
                    }
                    else if (FileExt == ".jpeg")
                    {
                        ext = ".jpeg";
                    }
                    else if (FileExt == ".png")
                    {
                        ext = ".png";
                    }
                    else
                    {
                        err++;
                        lblHostipalResult.Text += "Owner Photo upload (.jpg, .jpeg, .png)";
                    }
                    if (ext != "")
                    {
                        string Name = DateTime.Now.ToString("dd-MM-yyyy-hh-mm-ss");
                        cmd.Parameters.AddWithValue("@OwnerPhoto", Name + ext);
                        FileUploadOwnerPhoto.SaveAs(Server.MapPath("../Hospital/Image/Owner/" + Name + ext));
                    }
                }
                else
                {
                    if (ddlPersonalGender.SelectedValue == "Government")
                    {
                        cmd.Parameters.AddWithValue("@OwnerPhoto", "goverment.png");
                    }
                    else
                    {
                        cmd.Parameters.AddWithValue("@OwnerPhoto", chk.stringCheck("select OwnerPhoto " + sortcut));
                    }
                }
                if (FileUploadLicencePhoto.HasFile)
                {
                    string ext     = "";
                    string FileExt = Path.GetExtension(FileUploadLicencePhoto.FileName.ToLower());
                    if (FileExt == ".jpg")
                    {
                        ext = ".jpg";
                    }
                    else if (FileExt == ".jpeg")
                    {
                        ext = ".jpeg";
                    }
                    else if (FileExt == ".png")
                    {
                        ext = ".png";
                    }
                    else
                    {
                        err++;
                        lblHostipalResult.Text += "Owner Photo upload (.jpg, .jpeg, .png)";
                    }
                    if (ext != "")
                    {
                        string Name = DateTime.Now.ToString("dd-MM-yyyy-hh-mm-ss");
                        cmd.Parameters.AddWithValue("@LicencePhoto", Name + ext);
                        FileUploadLicencePhoto.SaveAs(Server.MapPath("../Hospital/Image/Owner/" + Name + ext));
                    }
                }
                else
                {
                    cmd.Parameters.AddWithValue("@LicencePhoto", chk.stringCheck("select LicencePhoto " + sortcut));
                }
                if (FileUploadHospitalPhoto.HasFile)
                {
                    string ext     = "";
                    string FileExt = Path.GetExtension(FileUploadHospitalPhoto.FileName.ToLower());
                    if (FileExt == ".jpg")
                    {
                        ext = ".jpg";
                    }
                    else if (FileExt == ".jpeg")
                    {
                        ext = ".jpeg";
                    }
                    else if (FileExt == ".png")
                    {
                        ext = ".png";
                    }
                    else
                    {
                        err++;
                        lblHostipalResult.Text += "Personal Photo upload (.jpg, .jpeg, .png)";
                    }
                    if (ext != "")
                    {
                        string Name = DateTime.Now.ToString("dd-MM-yyyy-hh-mm-ss");
                        cmd.Parameters.AddWithValue("@HospitalPhoto", Name + ext);
                        FileUploadHospitalPhoto.SaveAs(Server.MapPath("../Hospital/Temp/" + Name + ext));
                        HospitalEdit(Name + ext);
                    }
                }
                else
                {
                    cmd.Parameters.AddWithValue("@HospitalPhoto", chk.stringCheck("select HospitalPhoto " + sortcut));
                }
                if (chkAuthrise.Checked == true)
                {
                    cmd.Parameters.AddWithValue("@Authority", "TRUE");
                }
                else
                {
                    rn.ResultDate = 5;
                    cmd.Parameters.AddWithValue("@Authority", rn.RandomStringNumber("Authority"));
                }
                if (chkLoginParmit.Checked == true)
                {
                    cmd.Parameters.AddWithValue("@LoginParmit", "TRUE");
                }
                else
                {
                    cmd.Parameters.AddWithValue("@LoginParmit", "FALSE");
                }
                if (chkVerify.Checked == true)
                {
                    cmd.Parameters.AddWithValue("@Verify", "TRUE");
                }
                else
                {
                    cmd.Parameters.AddWithValue("@Verify", "FALSE");
                }
                cmd.Parameters.AddWithValue("@Command", "N/A");
                cmd.Parameters.AddWithValue("@Date", Convert.ToInt32(DateTime.Now.ToString("dd")));
                cmd.Parameters.AddWithValue("@Month", Convert.ToInt32(DateTime.Now.ToString("MM")));
                cmd.Parameters.AddWithValue("@Year", Convert.ToInt32(DateTime.Now.ToString("yyyy")));
                cmd.Parameters.AddWithValue("@IssuDate", DateTime.Now.ToString("dd-MM-yyyy"));
                cmd.Parameters.AddWithValue("@Owner", "Admin");
                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
                lblHostipalResult.Text      = "Update Sucessfully Registation.";
                lblHostipalResult.ForeColor = Color.Green;
            }
            else
            {
                lblHostipalResult.Text += "Seletct all List Fast.";
            }
        }