コード例 #1
0
        protected void Save_ARF(object sender, EventArgs e)
        {
            int           appid = Int32.Parse(Session["appid"].ToString());
            ARFFormFields ob    = new ARFFormFields();
            Service       my    = new Service();

            try
            {
                ob.AppID = Int32.Parse(Session["appid"].ToString());
                ob.DOB   = dob.Text;
                if (RadioButton2.Checked)
                {
                    ob.Gender = RadioButton2.Text;
                }
                else
                {
                    ob.Gender = RadioButton1.Text;
                }
                ob.FaName        = FaName.Text;
                ob.FaPhno        = FaCon.Text;
                ob.FaWork        = FaOcup.Text;
                ob.MoName        = MoName.Text;
                ob.MoPhno        = MoCon.Text;
                ob.MoWork        = MoOcup.Text;
                ob.Income        = income.Text;
                ob.Category      = category.SelectedItem.ToString();
                ob.Cast          = cast.Text;
                ob.Religion      = religionList.SelectedItem.ToString();
                ob.AddLine1      = addbox1.Text;
                ob.AddLine2      = addbox2.Text;
                ob.AddLine3      = addbox3.Text;
                ob.AdmissionType = admissionTypeList.SelectedItem.ToString();
                ob.AcademicYear  = "2021-2020";
                ob.AdmissionIn   = admissionyrList.SelectedItem.ToString();

                string url = "";
                string x   = my.ARF_Fill(ob);
                if (admissionyrList.SelectedValue.ToString().Equals("0"))
                {
                    url = "/Student/StudentARFPastEdu.aspx";
                }
                else
                {
                    url = "/Student/StudentARFPastEduDip.aspx";
                }
                Response.Write(x);
                x = x + admissionyrList.SelectedValue.ToString();
                string script = "window.onload = function(){ alert('";
                script += x;
                script += "');";
                script += "window.location = '";
                script += url;
                script += "'; }";
                ClientScript.RegisterStartupScript(this.GetType(), "Redirect", script, true);
            }
            catch (Exception ex)
            {
                Response.Write(ex);
            }
        }