예제 #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string msg = file_upload(FileUpload1);

            if (msg.Equals("-1"))
            {
                Response.Write("<script>alert('Some error in uploading image.......');</script>");
            }
            else
            {
                Applicants ap = new Applicants();
                ap.ap_cninc    = txtcnic.Text;
                ap.ap_password = txtpassword.Text;
                ap.ap_name     = username.Text;
                ap.ap_phone1   = contact1.Text;
                ap.ap_phone2   = contact2.Text;
                ap.ap_image    = msg;
                ap.ap_dob      = Convert.ToDateTime(Calendar1.SelectedDate.ToShortDateString());
                ap.ap_email    = txtemail.Text;
                if (Male.Checked == true)
                {
                    ap.ap_gender = 1;
                }
                else
                {
                    ap.ap_gender = 0;
                }
                ApplicantLogicLayer obj = new ApplicantLogicLayer();
                string msg2             = obj.insert(ap);
                if (msg2.Equals("1"))
                {
                    Response.Write("<script>alert('Data Successfully Uploaded.......');</script>");
                }
            }
        }//btn event end,,,,,,
예제 #2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            if (txtpassword.Text == txtcpassword.Text)
            {
                string msg = file_upload(ImageUploadUser);
                if (msg.Equals("-1"))
                {
                    Response.Write("<script>alert('some error with the mage!'); </script>");
                }
                else
                {
                    Applicant ap = new Applicant();

                    ap.ap_aadhar   = txtAadhar.Text;
                    ap.ap_password = txtpassword.Text;
                    ap.ap_name     = txtusername.Text;
                    ap.ap_phone1   = txtcontact.Text;
                    ap.ap_phone2   = txtcontact2.Text;
                    ap.ap_email    = txtemailid.Text;
                    ap.ap_image    = msg;

                    ap.ap_dob = new DateTime();
                    ap.ap_dob = Convert.ToDateTime(DropDownList1.SelectedItem.ToString() + "-" + DropDownList2.SelectedItem.ToString() + "-" + DropDownList3.SelectedItem.ToString());
                    if (Male.Checked == true)
                    {
                        ap.ap_gender = 1;
                    }
                    else
                    {
                        ap.ap_gender = 0;
                    }

                    ApplicantLogicLayer apl = new ApplicantLogicLayer();
                    string msg2             = apl.insert(ap);

                    if (msg2.Equals("1"))
                    {
                        Response.Write("<script>alert('Data successfully added!'); </script>");
                        Response.Redirect("~/Views/Applicant/Login.aspx");
                    }
                    else
                    {
                        Response.Write("<script>alert('data could not successfully uploaded...plz try again '); </script> ");
                    }
                }
            }
            else
            {
                Response.Write("<script>alert('Password Mismatch');</script>");
            }
        }
    } // Event end here
예제 #3
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            string s = file_upload(FileUpload1);

            if (s.Equals("-1"))
            {
                Label8.Text = "Image Could not be Uploaded,,,,,,,,";
            }
            else
            {
                ApplicantLogicLayer ap = new ApplicantLogicLayer();
                ap.UpdateImage(Convert.ToInt32(Session["u_id"]), s);
                Response.Redirect("~/View/Applicant/profile.aspx");
            }
        }
예제 #4
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Applicant ap = new Applicant();

        ap.ap_name   = txtname.Text;
        ap.ap_email  = txtemail.Text;
        ap.ap_phone1 = txtcontact.Text;
        ap.ap_phone2 = txtcontact2.Text;
        ap.ap_dob    = Convert.ToDateTime(txtdob.Text);
        ap.ap_id     = Convert.ToInt32(Session["u_id"].ToString());
        ApplicantLogicLayer logic = new ApplicantLogicLayer();

        logic.Update(ap);
        Response.Redirect("~/Views/Applicant/profile.aspx");
    }