public void saveFunction_SaveAll()
    {
        DatabaseFunctions db = new DatabaseFunctions();


        string userId = Membership.GetUser().ProviderUserKey.ToString();
        try
        {
            //if (tabName == "HasJambData")
            {
                string fullName = db.getStudent_CompleteName(userId);

                db.InsertJambData(ViewState["formnum"].ToString(), txtJambRegNo.Text, dropdownSubject1.SelectedItem.Value, txtScore1.Text, dropdownSubject2.SelectedItem.Value, txtscore2.Text,
                    dropdownSubject3.SelectedItem.Value, txtscore3.Text, dropdownSubject4.SelectedItem.Value, txtscore4.Text, dropdownJambchoice.SelectedItem.Value, userId);

            }
            //  else if (tabName == "HasBioDataSection")
            {
                string dob = dropdownyears.SelectedItem.Value + "-" + dropdownMonth.SelectedItem.Value + "-" + dropdownDay.SelectedItem.Value;
                string img = string.Empty;


                if (hidden_dpImage.Value != "")
                {
                    img = ViewState["formnum"].ToString() + ".jpg";
                }
                db.InsertBioData(ViewState["formnum"].ToString(), txtSurname.Text, txtFirstName.Text, txtOtherName.Text, dropdownGender.SelectedItem.Value, txtHomeaddress.Text, txtPhonenumber.Value, txtEmail.Text, dropdownSto.SelectedItem.Value, dropdownLocalGovtarea.SelectedItem.Value, userId, img, dob);

            }
            // else if (tabName == "HasOlevelResult")
            {
                db.InsertOlevelInfo_FirstSitting(ViewState["formnum"].ToString(), userId, dropdownExam.SelectedItem.Value, dropdownExamMonth.SelectedItem.Value, txtExamNum.Text, dropdownExamYear.SelectedItem.Value,
                    dropdownOlevelSub1.SelectedItem.Value, dropdownolevelGrade1.SelectedItem.Value, dropdownOlevelSub2.SelectedItem.Value, dropdownGrade2.SelectedItem.Value,
                    dropdownolevelSub3.SelectedItem.Value, dropdownGrade3.SelectedItem.Value, dropdownOlvlSub4.SelectedItem.Value, dropdownGrade4.SelectedItem.Value, dropdownOlevelsub5.SelectedItem.Value, dropdownGrade5.SelectedItem.Value,
                    dropdownOlevelSub6.SelectedItem.Value, dropdownGrade6.SelectedItem.Value, dropdownOlevelSub7.SelectedItem.Value, dropdonGrade7.SelectedItem.Value, dropdownolevelSub8.SelectedItem.Value, dropdownGrade8.SelectedItem.Value,
                    dropdowOlevelSub9.SelectedItem.Value, dropdownGrade9.SelectedItem.Value);

                db.InsertOlevelInfo_SecondSitting(ViewState["formnum"].ToString(), userId, dropdownExamType2.SelectedItem.Value, dropdownExamMonth2.SelectedItem.Value, txtExamNum2.Text, dropdownListexamyear2.SelectedItem.Value,
                   dropdownOlevelsubject1b.SelectedItem.Value, dropdownListGrade2.SelectedItem.Value, dropdownOlevelSub2b.SelectedItem.Value, dropdownGrade2b.SelectedItem.Value,
                   dropdownolevelSub3b.SelectedItem.Value, dropdownGrade3b.SelectedItem.Value, dropdownOlvlSub4b.SelectedItem.Value, dropdownGrade4b.SelectedItem.Value, dropdownOlevelsub5b.SelectedItem.Value, dropdownGrade5b.SelectedItem.Value,
                   dropdownOlevelSub6b.SelectedItem.Value, dropdownGrade6b.SelectedItem.Value, dropdownOlevelSub7b.SelectedItem.Value, dropdonGrade7b.SelectedItem.Value, dropdownolevelSub8b.SelectedItem.Value, dropdownGrade8b.SelectedItem.Value,
                   dropdowOlevelSub9b.SelectedItem.Value, dropdownGrade9b.SelectedItem.Value);

            }
            //  else if (tabName == "HasPreviousRecord")
            {
                string indstart = dropdownIndustrialtrainingStart.SelectedItem.Value + "-" + dropdownIndustrialTrainingEndYear.SelectedItem.Value;

                string indEnd = dropdownIndustrialStarmonth2.SelectedItem.Value + "-" + dropdownIndustrialTrainingYearStart2.SelectedItem.Value;


                db.InsertPreviousRecord(ViewState["formnum"].ToString(), userId, txtjaRegno_previous.Text, dropdownJambExamYear_Previous.SelectedItem.Value, txtJambFullName_previous.Text,
                    dropdwnJamIns_Previous.SelectedItem.Value, txtJambCourseName_previous.Text, dropdownCourseType_Previous.SelectedItem.Value, dropdownCourseGrade_Prvious.SelectedItem.Value,
                    dropdownyearCompleted_Previous.SelectedItem.Value, indstart, indEnd, txtNdMetricNum.Text);

            }
            //else if (tabName == "HasCBTSchedule")
            {
                DataSet ds = db.getSingleTimes_CBT(dropdownScheduleDate.SelectedItem.Value, Convert.ToInt32(ViewState["programID"]), dropdownTime.SelectedItem.Text.ToString());

                if (ds.Tables[0].Rows.Count > 0)
                {
                    //GET INGO ...
                    int ID = Convert.ToInt32(ds.Tables[0].Rows[0]["ID"].ToString());
                    int Usedcapacity = Convert.ToInt16(ds.Tables[0].Rows[0]["Used"].ToString());
                    Usedcapacity = Usedcapacity + 1;

                    int insertFlag = db.InsertCbtScheduleIngo(ViewState["formnum"].ToString(), userId, dropdownScheduleDate.SelectedItem.Value, dropdownTime.SelectedItem.Text, ViewState["formnum"].ToString(), lblCbtPassword.Text);
                    if (insertFlag > 0)
                    {
                        //UPDATE PROGRAM USED CAPACITY
                        db.updateCBTSCheduler(ID, Usedcapacity);
                    }

                }
            }
            //  if (tmp == 1)
            {
                //ScriptManager.RegisterStartupScript(this.Page, GetType(), "ClosePopup", "alert('Form section saved Successfully !');", true);
            }
        }
        catch (Exception ex)
        {

        }
    }