protected void GetStudentDetails(int StudentID)
        {
            BECommon objBECommon = new BECommon();
            BCommon  objBCommon  = new BCommon();

            objBECommon.IntStudentID = StudentID;
            objBCommon.BGetStudentDetails(objBECommon);
            if (objBECommon.DtResult != null && objBECommon.DtResult.Rows.Count > 0)
            {
                lblstudentfirstname.Text = objBECommon.DtResult.Rows[0]["FirstName"].ToString();
                lblStudentLastName.Text  = objBECommon.DtResult.Rows[0]["LastName"].ToString();
                lblEmailID.Text          = objBECommon.DtResult.Rows[0]["EmailAddress"].ToString();
                lblPhoneNumber.Text      = objBECommon.DtResult.Rows[0]["PhoneNumber"].ToString();
                lblTimeZone.Text         = objBECommon.DtResult.Rows[0]["TimeZone"].ToString();
                lblrole.Text             = objBECommon.DtResult.Rows[0]["Role_Name"].ToString();

                lblSpecialNeeds.Text = objBECommon.DtResult.Rows[0]["SpecialNeeds"].ToString();
                if (lblSpecialNeeds.Text == "Yes")
                {
                    trcomments.Visible = true;
                    if (objBECommon.DtResult.Rows[0]["Comments"] != DBNull.Value)
                    {
                        lblComments.Text = objBECommon.DtResult.Rows[0]["Comments"].ToString();
                    }
                }

                else
                {
                    trcomments.Visible = false;
                }
            }
        }
        protected void GetStudentDetails(int StudentID)
        {
            BECommon objBECommon = new BECommon();
            BCommon  objBCommon  = new BCommon();

            objBECommon.IntStudentID = StudentID;

            objBCommon.BGetStudentDetails(objBECommon);
            if (objBECommon.DtResult != null)
            {
                if (objBECommon.DtResult.Rows.Count > 0)
                {
                    lblstudentfirstname.Text = objBECommon.DtResult.Rows[0]["FirstName"].ToString() + ' ' + objBECommon.DtResult.Rows[0]["LastName"].ToString();
                    lblEmail.Text            = objBECommon.DtResult.Rows[0]["EmailAddress"].ToString();
                    lblPhoneNumber.Text      = objBECommon.DtResult.Rows[0]["PhoneNumber"].ToString();
                    lblTimeZone.Text         = objBECommon.DtResult.Rows[0]["TimeZone"].ToString();
                    lblSpecialNeeds.Text     = objBECommon.DtResult.Rows[0]["SpecialNeeds"].ToString();
                    string imgpath = objBECommon.DtResult.Rows[0]["PhotoIdentity"].ToString();

                    if (imgpath != "")
                    {
                        //imgstudent.ImageUrl = "~/Student/Student_Identity/" + imgpath.Substring(3).ToString();
                        imgstudent.ImageUrl = new AppSecurity().ImageToBase64(imgpath.Substring(3).ToString());
                    }
                    lblComments.Text = CommonFunctions.CheckNullValue(objBECommon.DtResult.Rows[0]["Comments"].ToString());
                }
            }
        }
        protected void GetStudentEditDetails(int StudentID)
        {
            BECommon objBECommon = new BECommon();
            BCommon  objBCommon  = new BCommon();

            objBECommon.IntStudentID = StudentID;

            Session["studentid"] = StudentID;

            objBCommon.BGetStudentDetails(objBECommon);
            if (objBECommon.DsResult != null)
            {
                if (objBECommon.DsResult.Tables[0].Rows.Count > 0)
                {
                    //lblStudentName.Text = objBEProctor.dtStudentResult.Rows[0]["studentName"].ToString();
                    // lblstudentid.Text = objBEProctor.StudentID.ToString();
                    lblstudentfirstname.Text = objBECommon.DsResult.Tables[0].Rows[0]["FirstName"].ToString();
                    lblSFirstName.Text       = objBECommon.DsResult.Tables[0].Rows[0]["FirstName"].ToString();
                    lblStudentLastName.Text  = objBECommon.DsResult.Tables[0].Rows[0]["LastName"].ToString();
                    lblSLastName.Text        = objBECommon.DsResult.Tables[0].Rows[0]["LastName"].ToString();
                    // lblgender.Text = objBEProctor.dtStudentResult.Rows[0]["GenderName"].ToString();
                    lblEmailID.Text      = objBECommon.DsResult.Tables[0].Rows[0]["EmailAddress"].ToString();
                    lblEmailAddress.Text = objBECommon.DsResult.Tables[0].Rows[0]["EmailAddress"].ToString();
                    // lblStatus.Text = objBEProctor.dtStudentResult.Rows[0]["StatusName"].ToString();
                    // lblusername.Text = objBEProctor.dtStudentResult.Rows[0]["UserName"].ToString();
                    txtPhoneNumber.Text  = objBECommon.DsResult.Tables[0].Rows[0]["PhoneNumber"].ToString();
                    lblMobileNumber.Text = objBECommon.DsResult.Tables[0].Rows[0]["PhoneNumber"].ToString();
                    lblSpecialNeeds.Text = objBECommon.DsResult.Tables[0].Rows[0]["SpecialNeeds"].ToString();
                    //ddlSpecialNeeds.SelectedItem.Text = objBECommon.DsResult.Tables[0].Rows[0]["SpecialNeeds"].ToString();
                    ddlSpecialNeeds.Items.FindByText(objBECommon.DsResult.Tables[0].Rows[0]["SpecialNeeds"].ToString()).Selected = true;
                    if (ddlSpecialNeeds.SelectedItem.Value == "1")
                    {
                        trcomments.Visible = true;
                        if (objBECommon.DsResult.Tables[0].Rows[0]["Comments"] != DBNull.Value)
                        {
                            lblcomments.Text  = objBECommon.DsResult.Tables[0].Rows[0]["Comments"].ToString();
                            txtcomments.Value = objBECommon.DsResult.Tables[0].Rows[0]["Comments"].ToString();
                        }
                    }
                    else if (ddlSpecialNeeds.SelectedItem.Value == "0")
                    {
                        trcomments.Visible = false;
                    }
                }
            }
        }
示例#4
0
        protected void GetStudentEditDetails(int StudentID)
        {
            BECommon objBECommon = new BECommon();
            BCommon  objBCommon  = new BCommon();

            objBECommon.IntStudentID = StudentID;

            Session["studentid"] = StudentID;

            objBCommon.BGetStudentDetails(objBECommon);

            if (objBECommon.DtResult != null && objBECommon.DtResult.Rows.Count > 0)
            {
                lblstudentfirstname.Text = objBECommon.DtResult.Rows[0]["FirstName"].ToString();
                lblSFirstName.Text       = objBECommon.DtResult.Rows[0]["FirstName"].ToString();
                lblStudentLastName.Text  = objBECommon.DtResult.Rows[0]["LastName"].ToString();
                lblSLastName.Text        = objBECommon.DtResult.Rows[0]["LastName"].ToString();
                lblEmailID.Text          = objBECommon.DtResult.Rows[0]["EmailAddress"].ToString();
                lblEmailAddress.Text     = objBECommon.DtResult.Rows[0]["EmailAddress"].ToString();

                lblSpecialNeeds.Text = objBECommon.DtResult.Rows[0]["SpecialNeeds"].ToString();
                ddlSpecialNeeds.Items.FindByText(objBECommon.DtResult.Rows[0]["SpecialNeeds"].ToString()).Selected = true;
                if (ddlSpecialNeeds.SelectedItem.Value == "1")
                {
                    trcomments.Visible = true;
                    if (objBECommon.DtResult.Rows[0]["Comments"] != DBNull.Value)
                    {
                        lblcomments.Text  = objBECommon.DtResult.Rows[0]["Comments"].ToString();
                        txtcomments.Value = objBECommon.DtResult.Rows[0]["Comments"].ToString();
                    }
                }
                else if (ddlSpecialNeeds.SelectedItem.Value == "0")
                {
                    trcomments.Visible = false;
                }

                lblStatus.Text = objBECommon.DtResult.Rows[0]["Status"].ToString();
                ddlStatus.Items.FindItemByText(objBECommon.DtResult.Rows[0]["Status"].ToString()).Selected = true;
            }



            objBECommon.iID     = StudentID;
            objBECommon.iTypeID = 1;
            objBCommon.BGetLMSSettings(objBECommon);

            if (objBECommon.DtResult != null && objBECommon.DtResult.Rows.Count > 0)
            {
                if (!Convert.ToBoolean(objBECommon.DtResult.Rows[0]["courseadmin"]))
                {
                    lblstudentfirstname.ReadOnly = Convert.ToBoolean(objBECommon.DtResult.Rows[0]["FirstName"]);
                    if (Convert.ToBoolean(objBECommon.DtResult.Rows[0]["FirstName"]))
                    {
                        lblstudentfirstname.CssClass    = "readonly";
                        RequiredFieldValidator1.Enabled = false;
                    }

                    lblStudentLastName.ReadOnly = Convert.ToBoolean(objBECommon.DtResult.Rows[0]["LastName"]);
                    if (Convert.ToBoolean(objBECommon.DtResult.Rows[0]["LastName"]))
                    {
                        lblStudentLastName.CssClass     = "readonly";
                        RequiredFieldValidator2.Enabled = false;
                    }


                    lblEmailID.ReadOnly = Convert.ToBoolean(objBECommon.DtResult.Rows[0]["EmailAddress"]);
                    if (Convert.ToBoolean(objBECommon.DtResult.Rows[0]["EmailAddress"]))
                    {
                        lblEmailID.CssClass                 = "readonly";
                        RequiredFieldValidator4.Enabled     = false;
                        RegularExpressionValidator1.Enabled = false;
                    }
                }
            }
        }