示例#1
0
 protected void btn_Save_Click(object sender, EventArgs e)
 {
     ServerSideValidations();
     if (oValidate.ValidateMe(lblErrorMessage))
     {
         string[] arrPreviousAndCurrentCrKeys = ddlCrPrChDesc.SelectedValue.Split('_');
         setXML(hidXml.Value);
         oHt = CreateHashTable(arrPreviousAndCurrentCrKeys);
         oclsAdmissionElgConfig = new clsAdmissionElgConfig();
         string[] status = new string[2];
         status = oclsAdmissionElgConfig.SaveAdmissionElgConfigurationsForCourse(oHt);
         if (status[0].Equals("E"))
         {
             lblErrorMessage.Text = "Information Cant be processed.Please Contact Administrator.";
         }
         else if (status[1].Equals("Y"))
         {
             lblNote.Visible = true;
             lblNote.Text    = "Information saved successfully.";
             FillTable();
         }
         else
         {
             lblNote.Visible  = true;
             lblNote.Text     = "Information cannot be saved.";
             lblNote.CssClass = "errorNote";
             // FillTable();
         }
     }
     //   btn_Save.Enabled = false;
     //else
     //{
     //    lblErrorMessage.CssClass = "errorNote";
     //}
 }
示例#2
0
        private void FillGridSearchRecord()
        {
            oAdmissionElgConfig = new clsAdmissionElgConfig();
            Hashtable oHt = new Hashtable();

            oHt["UniID"]          = clsGetSettings.UniversityID;
            oHt["AcademicYearID"] = ddlAcademicYear.SelectedValue;

            oHt["CourseName"] = txtSearchBox.Text.Trim();


            oDt = oAdmissionElgConfig.GetAllDefinedAdmissionEligibilityConfigurationsForSearch(oHt);

            if (oDt != null && oDt.Rows.Count > 0)
            {
                tblGridHolder.Visible = true;
                lblErrorMsg.Visible   = false;

                oGridView.DataSource = oDt;
                oGridView.DataBind();
            }
            else
            {
                tblGridHolder.Visible = false;
                lblErrorMsg.Visible   = true;
            }
        }
示例#3
0
 private void SetStatus()
 {
     string[] sArr = new string[2];
     oHt = CreateHashTable();
     oclsAdmissionElgConfig = new clsAdmissionElgConfig();
     sArr = oclsAdmissionElgConfig.GetAdmissionElgibilityConfigStatusofCourse(oHt);
     hidStatusElgConfig.Value           = sArr[0];
     hidStatusElgConfigIndepedent.Value = sArr[1];
     btn_Save.Enabled  = false;
     btnDelete.Enabled = false;
 }
示例#4
0
        private void FillCoursePart(string Uni_ID, string Inst_ID, string Fac_ID, string Cr_ID, string Molrn_ID, string Ptrn_ID, string Brn_ID)
        {
            ddlCrPrChDesc.Items.Clear();

            ddlCrPrChDesc.Items.Insert(0, new ListItem("--- Select ---", "0"));
            getFacCrMoLrnPtrnID();

            ddlCrPrDetailsDesc.Items.Clear();
            oDT     = new System.Data.DataTable();
            oCommon = new clsCommon();

            // Admission Eligibility :Fetch Course Part
            //Course Part having only one child should be displayed except the first one...
            //Course Part having more than one child should be displayed . Eg. MA-I and MA-II both should be displayed as both parts contains two terms
            Hashtable oHt = new Hashtable();

            oHt["UniID"]   = Uni_ID.Trim();
            oHt["FacID"]   = Fac_ID.Trim();
            oHt["CrID"]    = Cr_ID.Trim();
            oHt["MoLrnID"] = Molrn_ID.Trim();
            oHt["PtrnID"]  = Ptrn_ID.Trim();
            oHt["BrnID"]   = Brn_ID.Trim();
            if (Request.QueryString["frmPrevious"] != null)
            {
                oHt["PartOrTerm"] = hidAdmissionElgTypeID.Value;
            }
            else
            {
                oHt["PartOrTerm"] = rdbPartOrTerm.SelectedValue;
            }
            clsAdmissionElgConfig oAdmissionElgConfig = new clsAdmissionElgConfig();

            oDT = oAdmissionElgConfig.GetCoursePartForAdmissionElg(oHt);
            if (oDT.Rows.Count == 0)
            {
                lblNote.Text    = "There are no " + lblCr.Text + "-Parts available for the selected course for whom the Admission Eligibility can be configured.";
                lblNote.Visible = true;
            }
            else
            {
                lblNote.Text    = "";
                lblNote.Visible = false;
            }
            oCommon.fillDropDown(ddlCrPrDetailsDesc, oDT, string.Empty, "Text", "Value", "--- Select ---");
            //if(!IsPostBack)
            SelectItem(ddlCrPrDetailsDesc, sCrPrDetailsID);

            ToolkitScriptManager.GetCurrent(this.Page).SetFocus(ddlCrBrnDesc);
        }
示例#5
0
        private void FillPartTerm(string Uni_ID, string Inst_ID, string Fac_ID, string Cr_ID, string Molrn_ID, string Ptrn_ID, string Brn_ID, string CrPrDetails_ID, string sCurrentAndPreviousKeys)
        {
            getFacCrMoLrnPtrnID();
            ddlCrPrChDesc.Items.Clear();
            oDT     = new System.Data.DataTable();
            oCommon = new clsCommon();

            try
            {
                Hashtable oHt = new Hashtable();
                oHt["UniID"]         = Uni_ID.Trim();
                oHt["FacID"]         = Fac_ID.Trim();
                oHt["CrID"]          = Cr_ID.Trim();
                oHt["MoLrnID"]       = Molrn_ID.Trim();
                oHt["PtrnID"]        = Ptrn_ID.Trim();
                oHt["BrnID"]         = Brn_ID.Trim();
                oHt["CrPrDetailsID"] = CrPrDetails_ID.Trim();
                if (Request.QueryString["frmPrevious"] != null)
                {
                    oHt["PartOrTerm"] = hidAdmissionElgTypeID.Value;
                }
                else
                {
                    oHt["PartOrTerm"] = rdbPartOrTerm.SelectedValue;
                }


                // Admission Eligibility
                // Get Terms except first part or Term
                clsAdmissionElgConfig oAdmissionElgConfig = new clsAdmissionElgConfig();
                oDT = oAdmissionElgConfig.GetCoursePartTermForAdmissionElg(oHt);
                oCommon.fillDropDown(ddlCrPrChDesc, oDT, string.Empty, "Text", "Value", "--- Select ---");
                if (!string.IsNullOrEmpty(sCurrentAndPreviousKeys))
                {
                    // if (!IsPostBack)
                    SelectItem(ddlCrPrChDesc, sCurrentAndPreviousKeys);
                }
            }
            catch (Exception Ex5)
            {
                throw new Exception(Ex5.Message);
            }

            //ToolkitScriptManager.GetCurrent(this.Page).SetFocus(ddlCrPrChDesc);
        }
示例#6
0
 private void FillGrid()
 {
     oAdmissionElgConfig = new clsAdmissionElgConfig();
     oHt = CreateHashTable();
     oDt = oAdmissionElgConfig.GetAllDefinedAdmissionEligibilityConfigurations(oHt);
     if (oDt != null && oDt.Rows.Count > 0)
     {
         tblGridHolder.Visible = true;
         lblErrorMsg.Visible   = false;
         oGridView.DataSource  = oDt;
         oGridView.DataBind();
     }
     else
     {
         //lblErrorMessage.Text = "No record found.";
         //lblErrorMessage.Visible = true;
         // oGridView.Visible = false;
         Server.Transfer("AdmissionEligConfiguration.aspx");
     }
 }
示例#7
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            //  DropDownList ddlCourse = (DropDownList)YCMOU.FindControl("ddlTerm");
            string[] arrPreviousAndCurrentCrKeys = ddlCrPrChDesc.SelectedValue.Split('_');

            oHt = CreateHashTable(arrPreviousAndCurrentCrKeys);
            oclsAdmissionElgConfig = new clsAdmissionElgConfig();
            string result = oclsAdmissionElgConfig.DeleteConfigurations(oHt);

            if (result.Equals("Y"))
            {
                lblNote.Visible = true;
                lblNote.Text    = "Configuration deleted successfully.";
            }
            else
            {
                lblErrorMessage.Text = "Information Cant be processed.Please Contact Administrator.";
            }

            FillTable();

            btnDelete.Enabled = false;
        }
示例#8
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (rblResultConsideration.SelectedValue.Equals("1"))
            {
                // tblAdmissionEligibility.Style.Add("display", "block");
                tblAdmissionEligibility.Visible = true;
                ddlCrPrDetailsDesc.ClearSelection();
                ddlCrPrDetailsDesc.SelectedIndex = 0;
                ddlCrPrChDesc.ClearSelection();
                ddlCrPrChDesc.SelectedIndex = 0;
                oclsAdmissionElgConfig      = new clsAdmissionElgConfig();
                oHt = CreateHashTable();
                string sStatus = oclsAdmissionElgConfig.DeleteAdmissionElgibilityConfigIndependentofResultStatus(oHt);
            }
            else
            {
                //tblAdmissionEligibility.Style.Add("display", "none");
                tblAdmissionEligibility.Visible = false;

                oclsAdmissionElgConfig = new clsAdmissionElgConfig();
                oHt = CreateHashTable();
                string sStatus = oclsAdmissionElgConfig.SaveAdmissionElgibilityConfigIndependentofResultStatus(oHt);
                if (sStatus.Equals("Y"))
                {
                    lblErrorMessage.Text     = "Information saved successfully.";
                    lblErrorMessage.CssClass = "saveNote";
                }
                else
                {
                    lblErrorMessage.Text     = "Information cannot be saved.";
                    lblErrorMessage.CssClass = "errorNote";
                }
            }

            SetStatus();
        }
示例#9
0
        private void FillTable()
        {
            hidXml.Value      = "";
            btn_Save.Enabled  = true;
            btnDelete.Enabled = true;
            if (hidAdmissionElgTypeID.Value == string.Empty)
            {
                hidAdmissionElgTypeID.Value = rdbPartOrTerm.SelectedValue;
            }
            if (!ddlCrPrChDesc.SelectedValue.Equals("0") && !string.IsNullOrEmpty(ddlCrPrChDesc.SelectedValue))
            {
                hidPreviousAndCurrentCrKeys.Value = ddlCrPrChDesc.SelectedValue;
                string[] arrPreviousAndCurrentCrKeys = ddlCrPrChDesc.SelectedValue.Split('_');
                hidCurrentCrKeys.Value  = arrPreviousAndCurrentCrKeys[0];
                hidPreviousCrKeys.Value = arrPreviousAndCurrentCrKeys[1];
            }

            // DropDownList ddlCourse = (DropDownList)YCMOU.FindControl("ddlTerm");
            lttitle.Text = "Define Admission Eligibility Criteria for " + ddlCrPrChDesc.SelectedItem.Text;
            if (!ddlCrPrChDesc.SelectedValue.Equals("0") && !string.IsNullOrEmpty(ddlCrPrChDesc.SelectedValue))
            {
                // hidPreviousAndCurrentCrKeys.Value = ddlCrPrChDesc.SelectedValue;
                string[] arrPreviousAndCurrentCrKeys = ddlCrPrChDesc.SelectedValue.Split('_');
                oHt = CreateHashTable(arrPreviousAndCurrentCrKeys);
                oclsAdmissionElgConfig = new clsAdmissionElgConfig();
                string[] sResultArr = new string[7];
                //ELGV2_Coursepartwise_Eligibility_Configuration
                sResultArr = oclsAdmissionElgConfig.IsPreviousConfigurationExists(oHt);
                hidTermOrPartNames.Value = sResultArr[4];
                if (sResultArr[5].Equals("Y"))
                {
                    if (sResultArr[0].Equals("Y") && sResultArr[1].Equals("N"))
                    {
                        btn_Save.Enabled  = true;
                        btnDelete.Enabled = true;
                        oDt = oclsAdmissionElgConfig.GetAdmissionElgConfigurationsForCourse(oHt);
                        bool isNull = false;
                        if (string.IsNullOrEmpty(oDt.Rows[0]["PreviousAdmissionElgConfiguration"].ToString()))
                        {
                            isNull = true;
                        }
                        CreateTable(isNull, oDt.Rows[0]["PreviousAdmissionElgConfiguration"].ToString(), oDt.Rows[0]["CurrentAdmissionElgConfiguration"].ToString());
                        divtable.Visible = true;
                    }
                    else
                    {
                        if (sResultArr[0].Equals("Y") && sResultArr[1].Equals("Y"))
                        {
                            lblErrorMessage.Text    = "You cannot edit the configuration of the selected Part/Term as the Next Course Part/Term <b><font style='color:Black'>" + sResultArr[3] + " </font></b>is already configured.";
                            lblErrorMessage.Visible = true;
                            btnDelete.Enabled       = false;
                            btn_Save.Enabled        = false;
                            // duplicacy of code
                            oDt = oclsAdmissionElgConfig.GetAdmissionElgConfigurationsForCourse(oHt);
                            bool isNull = false;
                            if (string.IsNullOrEmpty(oDt.Rows[0]["PreviousAdmissionElgConfiguration"].ToString()))
                            {
                                isNull = true;
                            }
                            CreateTable(isNull, oDt.Rows[0]["PreviousAdmissionElgConfiguration"].ToString(), oDt.Rows[0]["CurrentAdmissionElgConfiguration"].ToString());
                            divtable.Visible = true;
                            //end
                        }
                        else
                        {
                            lblErrorMessage.Text    = "You cannot configure as the previous Course part/term <b><font style='color:Black'> " + sResultArr[2] + " </font></b>is not configured.";
                            lblErrorMessage.Visible = true;
                            btnDelete.Enabled       = false;
                            btn_Save.Enabled        = false;
                        }
                    }
                }
                else
                {
                    lblErrorMessage.Text  = "Admission eligibility is defined  <b><font style='color:Black;font-size:large;' >";
                    lblErrorMessage.Text += rdbPartOrTerm.SelectedValue.Equals("1") ? "term wise" : "part wise";
                    lblErrorMessage.Text += "</font></b> up to <b><font style='color:Black'> " + sResultArr[6] + "</font></b>. Please delete the existing configurations and redefine.";
                    btn_Save.Enabled      = false;
                    btnDelete.Enabled     = false;
                }
            }
            //btn_Save.Enabled = false;
            // btnDelete.Enabled = false;
        }