Пример #1
0
    protected void btnPrint_Click(object sender, EventArgs e)
    {
        string FromDate;
        string ToDate;

        try
        {
            FromDate = (DateTime.Parse(txtFromDate.Text)).ToShortDateString();
        }
        catch
        {
            FromDate = DateTime.Now.ToShortDateString();
        }
        try
        {
            ToDate = (DateTime.Parse(txtToDate.Text)).ToShortDateString();
        }
        catch
        {
            ToDate = DateTime.Now.ToShortDateString();
        }
        StudentRegistrationDAL s = new StudentRegistrationDAL();

        Response.Redirect("PrintOtherReport.aspx?B=" + FromDate + "&C=" + ToDate + "&E=21", false);
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         iPageRecords = 20;
         rdbName.Focus();
         if (!IsPostBack)
         {
             //rdbName.Checked = true;
             StudentRegistrationDAL s = new StudentRegistrationDAL();
             Drpschool.DataSource     = s.SetDropdownListAsDegreeType(50, 1, Session["schoolcode"].ToString());
             Drpschool.DataTextField  = "schoolname";
             Drpschool.DataValueField = "schoolcode";
             Drpschool.DataBind();
             Drpschool.SelectedValue = Session["schoolcode"].ToString();
             Drpschool_SelectedIndexChanged(sender, e);
             gvStudentList.DataSource = "";
             gvStudentList.DataBind();
             LoadDropdown();
             FillGridView(1, iPageRecords);
         }
     }
     catch
     {
         Response.Redirect("login.aspx");
     }
 }
Пример #3
0
    protected void DrpCOR_SelectedIndexChanged(object sender, EventArgs e)
    {
        StudentRegistrationDAL s = new StudentRegistrationDAL();

        try
        {
            if ((DrpCOR.SelectedValue == "UAE") || (DrpCOR.SelectedValue == "NG") || (DrpCOR.SelectedValue == "PK") || (DrpCOR.SelectedValue == "MA"))
            {
                pnltxtcity.Visible = false;
                pnldrpcity.Visible = true;

                drpcityname.DataSource     = s.SetDropdownwithparam(3, DrpCOR.SelectedValue);
                drpcityname.DataTextField  = "statename";
                drpcityname.DataValueField = "statename";
                drpcityname.DataBind();
            }
            else
            {
                pnltxtcity.Visible = true;
                pnldrpcity.Visible = false;
            }
        }
        catch
        {
        }
    }
    protected void btnPrint_Click(object sender, EventArgs e)
    {
        string EmpID = Session["EMPID"].ToString();
        string FromDate;
        string ToDate;

        try
        {
            FromDate = (DateTime.Parse(txtFromDate.Text)).ToShortDateString();
        }
        catch
        {
            FromDate = DateTime.Now.ToShortDateString();
        }
        try
        {
            ToDate = (DateTime.Parse(txtToDate.Text)).ToShortDateString();
        }
        catch
        {
            ToDate = DateTime.Now.ToShortDateString();
        }
        StudentRegistrationDAL s = new StudentRegistrationDAL();

        Response.Redirect("PrintOtherReport.aspx?A=" + EmpID + "&B=" + FromDate + "&C=" + ToDate + "&D=" + ddlCountry.SelectedValue + "&F=" + ddloption.SelectedValue + "&E=17", false);
    }
Пример #5
0
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         int Id = 0;
         try
         {
             Id = int.Parse(Session["ID"].ToString());
         }
         catch
         {
             Id = int.Parse(Request.QueryString["Id"].ToString());
         }
         StudentRegistrationDAL s = new StudentRegistrationDAL();
         string RegisterNo        = s.DeleteStudentDetails(Id);
         string Name  = Session["Name"].ToString();
         string EMPID = Session["EMPID"].ToString();
         Session.Clear();
         NewLoad();
         Session["Name"]    = Name;
         Session["EMPID"]   = EMPID;
         lblMesag.Text      = "Sucessfully Removed!!!";
         lblMesag.ForeColor = System.Drawing.Color.Blue;
         //ResetField();
     }
     catch
     {
         lblMesag.Text = "Please Try Again!!!";
     }
 }
Пример #6
0
    protected void btnPrint_Click(object sender, EventArgs e)
    {
        // string EmpID = Session["EMPID"].ToString();
        string FromDate;
        string ToDate;

        try
        {
            //   FromDate = (DateTime.Parse(txtFromDate.Text)).ToShortDateString();
            FromDate = Convert.ToString(txtFromDate.Text);
        }
        catch
        {
            FromDate = DateTime.Now.ToString();
        }
        try
        {
            // ToDate = (DateTime.Parse(txtToDate.Text)).ToShortDateString();
            ToDate = Convert.ToString(txtToDate.Text);
        }
        catch
        {
            ToDate = DateTime.Now.ToString();
        }
        StudentRegistrationDAL s = new StudentRegistrationDAL();

        Response.Redirect("PrintOtherReport.aspx?A=" + rad_but.SelectedItem.Value + "&B=" + FromDate + "&C=" + ToDate + "&E=27", false);
    }
Пример #7
0
    protected void lnkview_clicked(object sender, EventArgs e)
    {
        imgapp.Visible = false;
        Label1.Text    = "";
        LinkButton  list  = (LinkButton)sender;
        GridViewRow rv    = (GridViewRow)list.Parent.Parent;
        GridViewRow gvrow = (GridViewRow)list.NamingContainer;

        string s = (gvrow.FindControl("hdntc") as HiddenField).Value;

        Lbltestcode2.Text = s;

        int idx = rv.RowIndex;

        try
        {
            StudentRegistrationDAL app = new StudentRegistrationDAL();
            DataSet ds;
            ds = app.GetCounsilValues(s);
            txtremarks.Text     = ds.Tables[0].Rows[0][0].ToString();
            txtSCFromDay.Text   = ds.Tables[0].Rows[0][1].ToString();
            txtSCFromMonth.Text = ds.Tables[0].Rows[0][2].ToString();
            txtSCFromYear.Text  = ds.Tables[0].Rows[0][3].ToString();
            lblmess.Text        = "";
            this.ModalPopupExtender1.Show();
        }
        catch
        {
        }
    }
Пример #8
0
    protected void btnPrint_Click(object sender, EventArgs e)
    {
        //string EmpID = Session["EMPID"].ToString();
        //string FromDate;
        //string ToDate;
        //try
        //{
        //    FromDate = (DateTime.Parse(txtFromDate.Text)).ToShortDateString();
        //}
        //catch
        //{
        //    FromDate = DateTime.Now.ToShortDateString();
        //}
        //try
        //{
        //    ToDate = (DateTime.Parse(txtToDate.Text)).ToShortDateString();
        //}
        //catch
        //{
        //    ToDate = DateTime.Now.ToShortDateString();
        //}
        StudentRegistrationDAL s = new StudentRegistrationDAL();

        Response.Redirect("CMS-VarianceReportviewer.aspx?A=" + txtFromDate.Text + "&B=" + txtToDate.Text, false);
    }
Пример #9
0
    protected void btn_save_click(object sender, EventArgs e)
    {
        int    result = 0; int count = 0;
        string txtshed = txt_sched.Text;
        string facname = txt_fac.Text;
        string fdate   = txtFromDate.Text;
        string tdate   = txtToDate.Text;

        result = StudentRegistrationDAL.getId(txtshed, facname, fdate, tdate);

        string enteredby   = Session["Name"].ToString();
        string entereddate = (DateTime.Now).ToString();

        foreach (GridViewRow gr in grid_tab.Rows)
        {
            TextBox txtcont     = (TextBox)grid_tab.Rows[count].FindControl("TextBox1");
            TextBox txtope      = (TextBox)grid_tab.Rows[count].FindControl("TextBox2");
            TextBox txtacademic = (TextBox)grid_tab.Rows[count].FindControl("TextBox3");
            TextBox txttrans    = (TextBox)grid_tab.Rows[count].FindControl("TextBox4");
            TextBox txtwkpln    = (TextBox)grid_tab.Rows[count].FindControl("TextBox5");
            result2 = StudentRegistrationDAL.Insert_course_fileplanner(result, txtshed, facname, txtcont.Text, txtope.Text, txtacademic.Text, txttrans.Text, fdate, tdate, enteredby, entereddate, txtwkpln.Text);
            count   = count + 1;
        }

        lbl_msg.Text       = "Saved Successfully";
        btn_report.Visible = true;
        bindgrid();
    }
Пример #10
0
    protected void btnPrint_Click(object sender, EventArgs e)
    {
        string EmpID = Session["EMPID"].ToString();
        string FromDate;
        string ToDate;

        try
        {
            FromDate = (DateTime.Parse(txtFromDate.Text)).ToShortDateString();
        }
        catch
        {
            FromDate = DateTime.Now.ToShortDateString();
        }
        try
        {
            ToDate = (DateTime.Parse(txtToDate.Text)).ToShortDateString();
        }
        catch
        {
            ToDate = DateTime.Now.ToShortDateString();
        }
        StudentRegistrationDAL s = new StudentRegistrationDAL();
        string Pr = "0";

        if (rdbPr.Checked == true)
        {
            Pr = "1";
        }
        else
        {
            Pr = "2";
        }
        Response.Redirect("PrintOtherReport.aspx?A=" + ddlTerm.SelectedValue + "&B=" + FromDate + "&C=" + ToDate + "&D=" + Pr + "&E=12", false);
    }
Пример #11
0
    protected void ddlStudentStatus_SelectedIndexChanged(object sender, EventArgs e)
    {
        StudentRegistrationDAL s = new StudentRegistrationDAL();
        DataTable dt             = s.GetCheckStudent(Request.QueryString["Id"].ToString());

        if (dt.Rows.Count == 1)
        {
            if (ddlStudentStatus.SelectedValue == "A")
            {
                lblMesag.Text      = "Student is Active!";
                lblMesag.ForeColor = System.Drawing.Color.Red;
                btnUpdate.Enabled  = false;
                return;
            }
            else
            {
                btnUpdate.Enabled = true;
                lblMesag.Text     = "";
            }
        }
        else
        {
            btnUpdate.Enabled = true;
            lblMesag.Text     = "";
        }
        if (ddlStudentStatus.SelectedValue == "P")
        {
            ddlTerm.Enabled = true;
        }
        else
        {
            ddlTerm.Enabled = false;
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             txtRegNo.Text         = GeTRegNo();
             txtAttendedBy.Text    = Session["Name"].ToString();
             txtCallDate.Text      = (DateTime.Now).ToString();
             pnlStudentReg.Visible = false;
             LoadDropdown();
             txtRegNo.Focus();
             SetData();
         }
         catch
         {
             Response.Redirect("Login.aspx", false);
         }
         try
         {
             txtLinkId.Text = Request.QueryString["Id"].ToString();
             txtLinkId_TextChanged(sender, e);
             StudentRegistrationDAL s = new StudentRegistrationDAL();
             txtAttendedBy.Text = s.GetRegisteredBy(txtLinkId.Text);
             if (txtAttendedBy.Text == "")
             {
                 txtAttendedBy.Text = Session["Name"].ToString();
             }
         }
         catch
         {
             btnSave.Visible = true;
         }
     }
 }
Пример #13
0
    protected void lbGoBack_Click(object sender, EventArgs e)
    {
        StudentRegistrationDAL s = new StudentRegistrationDAL();
        string LinkId            = s.GetLinkIdByRegNo(Request.QueryString["Id"].ToString());

        Response.Redirect(string.Format("StudentRegistration.aspx?Id={0}", LinkId), false);
    }
    protected void Btnsavegr_Click(object sender, EventArgs e)
    {
        StudentRegistrationDAL s = new StudentRegistrationDAL();

        try
        {
            DataTable Result = s.InsertFollowupGraduation(int.Parse(Request.QueryString["Id"].ToString()), 0, 0, int.Parse(Session["EMPID"].ToString()), drpstud.SelectedValue.ToString(), "G");

            if (Result.Rows[0][0] == "0")
            {
                lblgrmess.Text      = "Try again !!!";
                lblgrmess.ForeColor = System.Drawing.Color.Red;
                return;
            }
            else
            {
                lblgrmess.Text      = "Tagged Successfully !!!";
                lblgrmess.ForeColor = System.Drawing.Color.Blue;
            }
        }
        catch (Exception ex)
        {
            lblgrmess.Text      = "Try again !!!";
            lblgrmess.ForeColor = System.Drawing.Color.Red;
            return;
        }
    }
Пример #15
0
    public void bindgrid()
    {
        StudentRegistrationDAL s = new StudentRegistrationDAL();

        gvStudentList.DataSource = s.GetExamDate();
        gvStudentList.DataBind();
    }
Пример #16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         StudentRegistrationDAL s = new StudentRegistrationDAL();
         if (!IsPostBack)
         {
             //ddlTerm.DataSource = s.SetDropdownListCDB(108);
             //ddlTerm.DataTextField = "Term";
             //ddlTerm.DataValueField = "Term";
             //ddlTerm.DataBind();
             ddlAcademicYear.DataSource     = s.SetDropdownListCDB(114);
             ddlAcademicYear.DataTextField  = "AcadYear_Desc";
             ddlAcademicYear.DataValueField = "AcadYear_Desc";
             ddlAcademicYear.DataBind();
             pnlReportViwer.Visible = false;
         }
         if (IsPostBack)
         {
             //btnSubmit_Click(sender, e);
         }
     }
     catch
     {
     }
 }
    protected void gvStudentList_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        try
        {
            if (e.CommandName.Equals("Modify"))
            {
                string Id = e.CommandArgument.ToString();
                StudentRegistrationDAL s = new StudentRegistrationDAL();
                //string Result = s.InsertAttendCall(Id);
                //Response.Redirect(string.Format("FollowUp.aspx?Id={0}", Id), false);

                int index = Convert.ToInt32(e.CommandArgument);

                // Retrieve the row that contains the button
                // from the Rows collection.
                GridViewRow row = gvStudentList.Rows[index];

                HiddenField hn1 = (HiddenField)gvStudentList.Rows[index].FindControl("hdnid");
                HiddenField hn2 = (HiddenField)gvStudentList.Rows[index].FindControl("hdnstud");
                if (hn2.Value == "4")
                {
                    Response.Redirect("Followupexistingstud.aspx?Id=" + int.Parse(hn1.Value) + "&A=" + "F", false);
                }
                else
                {
                    Response.Redirect("FollowUp.aspx?Id=" + int.Parse(hn1.Value) + "&A=" + "F", false);
                }
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Пример #18
0
    public void BindGrid()
    {
        StudentRegistrationDAL s = new StudentRegistrationDAL();

        gvPolicyList.DataSource = s.SetDropdownListCDB(93);
        gvPolicyList.DataBind();
    }
Пример #19
0
    private void FillGridView()
    {
        lblMesag.Text = "";
        try
        {
            string FilterBy = "All";
            if (rdbNumber.Checked == true)
            {
                FilterBy = "Number";
            }
            if (rdbEmail.Checked == true)
            {
                FilterBy = "Email";
            }
            if (rdbName.Checked == true)
            {
                FilterBy = "Name";
            }
            int NonRegistered = -1;

            string EmpId = "";
            EmpId = Session["EmpId"].ToString();
            StudentRegistrationDAL s  = new StudentRegistrationDAL();
            System.Data.DataTable  dt = s.GetStudentDetails(FilterBy, txtFilterValue.Text, NonRegistered, EmpId, Drpschool.SelectedValue);
            ViewState["_ds_grid"]    = dt;
            gvStudentList.DataSource = dt;
            gvStudentList.DataBind();
        }
        catch (Exception ex)
        {
            lblMesag.Text = "Please Fill Correct Information!";
        }
    }
Пример #20
0
    public void LoadDropDown()
    {
        StudentRegistrationDAL s = new StudentRegistrationDAL();

        ddlFormName.DataSource     = s.SetDropdownListCDB(88);
        ddlFormName.DataTextField  = "FormName";
        ddlFormName.DataValueField = "Id";
        ddlFormName.DataBind();

        ddlProgram.DataSource     = s.SetDropdownListCDB(89);
        ddlProgram.DataTextField  = "Program";
        ddlProgram.DataValueField = "Id";
        ddlProgram.DataBind();

        ddlFormType.DataSource     = s.SetDropdownListCDB(90);
        ddlFormType.DataTextField  = "FormType";
        ddlFormType.DataValueField = "Id";
        ddlFormType.DataBind();

        ddlAcademicYear.DataSource     = s.SetDropdownListCDB(91);
        ddlAcademicYear.DataTextField  = "FNAME";
        ddlAcademicYear.DataValueField = "Id";
        ddlAcademicYear.DataBind();

        ddlFeeGroup.DataSource     = s.SetDropdownListCDB(92);
        ddlFeeGroup.DataTextField  = "FeeWaiverType";
        ddlFeeGroup.DataValueField = "Id";
        ddlFeeGroup.DataBind();
    }
Пример #21
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         StudentRegistrationDAL s = new StudentRegistrationDAL();
         if (!IsPostBack)
         {
             ddlEmployee.DataSource     = s.SetDropdownListCDB(73);
             ddlEmployee.DataTextField  = "Name";
             ddlEmployee.DataValueField = "EmpId";
             ddlEmployee.DataBind();
             pnlReportViwer.Visible = false;
             if (Session["GroupName"].ToString() != "UAE")
             {
                 ddlCountry.SelectedValue = Session["GroupName"].ToString();
                 ddlCountry.Enabled       = false;
             }
         }
         if (IsPostBack)
         {
             //btnSubmit_Click(sender, e);
         }
     }
     catch
     {
     }
 }
Пример #22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                StudentRegistrationDAL s = new StudentRegistrationDAL();
                Drpschool.DataSource     = s.SetDropdownListAsDegreeType(50, 1, Session["schoolcode"].ToString());
                Drpschool.DataTextField  = "schoolname";
                Drpschool.DataValueField = "schoolcode";
                Drpschool.DataBind();
                Drpschool.SelectedValue = Session["schoolcode"].ToString();
                Drpschool_SelectedIndexChanged(sender, e);

                Session["schoolcode1"] = Drpschool.SelectedValue;
                Session["EMPID1"]      = Session["EMPID"].ToString();

                if (chkall.Checked == false)
                {
                    Session["EMPID1"] = Session["EMPID"].ToString();
                }
                else
                {
                    Session["EMPID1"] = "0";
                }
                //dsDetails.SelectParameters.Add("empid", Session["EMPID1"].ToString());
            }
        }
        catch
        {
            Response.Redirect("Login.aspx");
        }
    }
Пример #23
0
    public void LoadDropdown()
    {
        StudentRegistrationDAL s = new StudentRegistrationDAL();

        ddlTitle.DataSource     = s.SetDropdownListCDB(12);
        ddlTitle.DataTextField  = "Title";
        ddlTitle.DataValueField = "Id";
        ddlTitle.DataBind();

        ddlBloodGroup.DataSource     = s.SetDropdownListCDB(17);
        ddlBloodGroup.DataTextField  = "BloodGroup";
        ddlBloodGroup.DataValueField = "Id";
        ddlBloodGroup.DataBind();

        ddlProficiencyInEnglish.DataSource     = s.SetDropdownListCDB(18);
        ddlProficiencyInEnglish.DataTextField  = "ProficiencyInEnglish";
        ddlProficiencyInEnglish.DataValueField = "Id";
        ddlProficiencyInEnglish.DataBind();

        ddlGender.DataSource     = s.SetDropdownListCDB(19);
        ddlGender.DataTextField  = "Gender";
        ddlGender.DataValueField = "Id";
        ddlGender.DataBind();

        ddlNationality.DataSource     = s.SetDropdownListCDB(2);
        ddlNationality.DataTextField  = "NationalityName";
        ddlNationality.DataValueField = "NationalityCode";
        ddlNationality.DataBind();
    }
Пример #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        StudentRegistrationDAL s = new StudentRegistrationDAL();
        string path = "";

        path = Server.MapPath("~/Report/CMS_FOLLOWUP_REPORT.rpt");
        rptStudent.Load(path);
        rptStudent.SetParameterValue("@degreetype", Request.QueryString["C"].ToString());
        rptStudent.SetParameterValue("@fromdate", Request.QueryString["A"].ToString());
        rptStudent.SetParameterValue("@todate", Request.QueryString["B"].ToString());
        rptStudent.SetParameterValue("@createdby", Session["EMPID"].ToString());
        rptStudent.SetParameterValue("@GROUPCODE", Request.QueryString["E"].ToString());
        rptStudent.SetDatabaseLogon("software", "DelFirMENA$idea");
        CrystalReportViewer1.ReportSource = rptStudent;
        CrystalReportViewer1.DataBind();
        CrystalReportViewer1.HasCrystalLogo           = false;
        CrystalReportViewer1.HasDrilldownTabs         = false;
        CrystalReportViewer1.HasDrillUpButton         = false;
        CrystalReportViewer1.HasExportButton          = true;
        CrystalReportViewer1.HasGotoPageButton        = true;
        CrystalReportViewer1.HasPageNavigationButtons = true;
        CrystalReportViewer1.HasPrintButton           = true;

        CrystalReportViewer1.HasSearchButton          = false;
        CrystalReportViewer1.HasToggleGroupTreeButton = false;

        CrystalReportViewer1.DisplayToolbar = true;

        CrystalReportViewer1.BackColor = System.Drawing.Color.White;
    }
Пример #25
0
 public void SetData1()
 {
     try
     {
         StudentRegistrationDAL s = new StudentRegistrationDAL();
         DataTable dt             = s.SetStudentDetails1(int.Parse(txtLinkId.Text));
         foreach (DataRow ro in dt.Rows)
         {
             txtRegNo.Text                         = ro["RegistrationNo"].ToString();
             txtCallDate.Text                      = ro["CallDate"].ToString();
             txtFirstName.Text                     = ro["FirstName"].ToString();
             txtLastName.Text                      = ro["LastName"].ToString();
             txtMiddleName.Text                    = ro["MiddleName"].ToString();
             ddlGender.SelectedValue               = ro["Gender"].ToString();
             ddlTitle.SelectedValue                = ro["Title"].ToString();
             ddlNationality.SelectedValue          = ro["Nationality"].ToString();
             txtAttendedBy.Text                    = Session["Name"].ToString();
             txtEmailID.Text                       = ro["EmailID"].ToString();
             txtMobileNo.Text                      = ro["MobileNo"].ToString();
             ddlNationality.SelectedValue          = ro["Nationality"].ToString();
             ddlInternationalStudent.SelectedValue = ro["IsInternationalStudent"].ToString();
         }
     }
     catch (Exception ex)
     {
     }
 }
Пример #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if ((Session["EMPID"].ToString() == "11049") || (Session["EMPID"].ToString() == "69") || (Session["EMPID"].ToString() == "225"))

            {
                StudentRegistrationDAL s = new StudentRegistrationDAL();
                lblMesag.Text = "";
                //rbtIlets.Checked = true;
                drpentrancetesttype.DataSource     = s.SetDropdownListCDB(107);
                drpentrancetesttype.DataTextField  = "TestType";
                drpentrancetesttype.DataValueField = "code";
                drpentrancetesttype.DataBind();



                bindgrid();
                btnUpdate.Visible = false;
                btnAdd.Visible    = true;
            }
            else

            {
                Response.Redirect("login.aspx");
            }
        }
    }
Пример #27
0
    protected void ddlStudentStatus_SelectedIndexChanged(object sender, EventArgs e)
    {
        StudentRegistrationDAL s = new StudentRegistrationDAL();


        if (ddlStudentStatus.SelectedValue == "9")
        {
            ddlExhibition.Enabled        = true;
            ddlExhibition.SelectedIndex  = 0;
            ddlExhibition.DataSource     = s.SetDropdownListCDB(53);
            ddlExhibition.DataTextField  = "Event";
            ddlExhibition.DataValueField = "Id";
            ddlExhibition.DataBind();
            lblEvents.Text = "Events";
        }
        else if (ddlStudentStatus.SelectedValue == "12")
        {
            ddlExhibition.DataSource     = s.SetDropdownListCDB(84);
            ddlExhibition.DataTextField  = "SchoolName";
            ddlExhibition.DataValueField = "Id";
            ddlExhibition.DataBind();

            ddlExhibition.Enabled       = true;
            ddlExhibition.SelectedIndex = 0;
            lblEvents.Text = "Schools";
        }
        else
        {
            ddlExhibition.Enabled = false;
        }
    }
Пример #28
0
    protected void btnAdd_Click1(object sender, EventArgs e)
    {
        try
        {
            value = drpentrancetesttype.SelectedValue;

            StudentRegistrationDAL a = new StudentRegistrationDAL();
            if (txtExamDate.Text == "")
            {
                lblMesag.Text      = "Entrance Date Required!";
                lblMesag.ForeColor = System.Drawing.Color.Red;
                return;
            }

            string Result = a.InsertCourseExam(txtExamDate.Text, txtEngExFrom.Text, txtEngExTo0.Text, txtMathExFrom.Text, txtMathExTo.Text, value, chk.Checked);
            if (Result == "EntranceDate")
            {
                lblMesag.Text      = "Successfully Added!";
                lblMesag.ForeColor = System.Drawing.Color.Blue;
                txtExamDate.Text   = "";
                bindgrid();
            }
            else
            {
                lblMesag.Text      = "Please Try Again!";
                lblMesag.ForeColor = System.Drawing.Color.Red;
                return;
            }
        }
        catch (Exception ex)
        {
            lblMesag.Text = "Please Try Again!";
        }
    }
Пример #29
0
    protected void btn_plus_click(object sender, EventArgs e)
    {
        // AddNewRowToGrid();
        string acadyearid       = Convert.ToString(ddl_acyear.SelectedItem.Value);
        int    termid           = Convert.ToInt16(ddl_termname.SelectedItem.Value);
        int    semesterId       = Convert.ToInt16(ddl_semester.SelectedItem.Value);
        int    courseId         = Convert.ToInt16(ddl_shed_course.SelectedItem.Value);
        int    FacultyId        = Convert.ToInt16(ddl_Faculty.SelectedItem.Value);
        int    targetstudents   = Convert.ToInt16(txt_Maxseat.Text);
        int    achievedstudents = Convert.ToInt16(txt_Minseat.Text);
        int    typeid           = Convert.ToInt16(ddl_types.SelectedItem.Value);

        int Result = StudentRegistrationDAL.Insertcpdmasterdetails(acadyearid, termid, semesterId, courseId, FacultyId, targetstudents, achievedstudents);
        int submasterId = 0; int count = 0;

        foreach (GridViewRow gr in GridView1.Rows)
        {
            Label        activity       = (Label)GridView1.Rows[count].FindControl("txt_Activities");
            DropDownList status1        = (DropDownList)GridView1.Rows[count].FindControl("ddl_status");
            DropDownList Responsibility = (DropDownList)GridView1.Rows[count].FindControl("ddl_res");

            string activities = Convert.ToString(activity.Text);
            int    statusid   = Convert.ToInt16(status1.SelectedItem.Value);
            int    ResponseId = Convert.ToInt16(Responsibility.SelectedItem.Value);
            string empid      = Session["EMPID"].ToString();
            submasterId = StudentRegistrationDAL.InsertCpdSubmasterDetails(Convert.ToInt32(Result), activities, statusid, ResponseId, empid, GetMacAddress(), Convert.ToInt16(typeid));
            count       = count + 1;
        }
        int aa = Result;

        lbl_acknow.Visible = true;
        lbl_acknow.Text    = "Saved Successfully";
        bindMastergrid();
    }
Пример #30
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         this.FillGridView();
         try
         {
             StudentRegistrationDAL s = new StudentRegistrationDAL();
             lblUserName.Text      = "Student Name : " + s.GetName(int.Parse(Request.QueryString["Id"].ToString()));
             lblUserName.Text      = lblUserName.Text.ToUpper();
             lblDate.Text          = "Registration No : " + s.GetRegNo(Request.QueryString["Id"].ToString());
             lblUserName.ForeColor = System.Drawing.Color.Blue;
             lblDate.ForeColor     = System.Drawing.Color.Blue;
             int Count = s.IsMissedCall(int.Parse(Session["EmpId"].ToString()));
             if (Count > 0)
             {
                 imgRequest.ImageUrl = "~/Icons/notifcation-message.png";
                 lblCount.Visible    = true;
                 div1.Visible        = true;
                 lblCount.Text       = Count.ToString();
             }
             else
             {
                 imgRequest.ImageUrl = "~/Icons/notification-on.png";
                 lblCount.Visible    = false;
                 div1.Visible        = false;
             }
         }
         catch
         {
         }
     }
 }