protected bool AllowMultiLangual() { bool Flag = false; try { SBlogic = new Student_DashBoard_BLogic(); DataSet dsMultiLangual = new DataSet(); dsMultiLangual = SBlogic.BAL_Select_PaymentPagesInfo("MultiLangual"); if (dsMultiLangual != null & dsMultiLangual.Tables.Count > 0) { if (dsMultiLangual.Tables[0].Rows.Count > 0) { if (dsMultiLangual.Tables[0].Rows[0]["value"].ToString() == "0") { Flag = false; } else { Flag = true; } } } } catch (Exception ex) { WebMsg.Show(ex.Message); } return(Flag); }
protected void BtnSubmit_Click(object sender, EventArgs e) { obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); obj_Student_Dashboard.BMSID = Convert.ToInt64(Session["BMSID"]); obj_Student_Dashboard.SubjectID = Convert.ToInt16(Session["SubjectID"]); obj_Student_Dashboard.StudentID = Convert.ToInt64(Session["StudentID"]); obj_Student_Dashboard.ChapterID = Convert.ToInt64(ddlChapter.SelectedValue); obj_Student_Dashboard.TopicID = Convert.ToInt64(ddlTopic.SelectedValue); int result = obj_BAL_Student_Dashboard.BAL_Insert_Rescheduling_BMSSCT(obj_Student_Dashboard); if (result == ((int)EnumFile.AssignValue.One)) { WebMsg.Show("Submit Query Successfully."); Applied_Chapter_Topics(); } else if (result == ((int)EnumFile.AssignValue.Zero)) { WebMsg.Show("This Chapter, Topic are allready requested for Rescheduling."); } DropDownList[] disddl3 = { ddlChapter, ddlTopic }; DisableDropDwon(disddl3); DropDownList[] disddl = { ddlChapter }; EnableDropDwon(disddl); }
protected void btnreport_Click(object sender, EventArgs e) { try { obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); obj_Student_Dashboard.BMSID = Convert.ToInt64(Session["BMSID"]); obj_Student_Dashboard.SubjectID = Convert.ToInt16(ddlsubject.SelectedValue); obj_Student_Dashboard.StudentID = Convert.ToInt64(Session["StudentID"]); DataSet dsSettings = new DataSet(); DataSet dsSelect = new DataSet(); dsSelect = obj_BAL_Student_Dashboard.BAL_Select_Covered_Syllabus(obj_Student_Dashboard); dt1.Columns.Add("Chapter", typeof(string)); dt1.Columns.Add("Persentage", typeof(string)); if (dsSelect.Tables[1].Rows.Count > 0) { for (int j = 0; j < dsSelect.Tables[0].Rows.Count; j++) { dt2 = new DataTable("tblTest1"); dt2.Columns.Add("Chapter", typeof(string)); dt2.Columns.Add("ChapterID", typeof(string)); dt2.Columns.Add("TopicID", typeof(string)); for (int i = 0; i < dsSelect.Tables[1].Rows.Count; i++) { if (dsSelect.Tables[0].Rows[j]["ChapterID"].ToString() == dsSelect.Tables[1].Rows[i]["ChapterID"].ToString()) { DataRow dr; dr = dt2.NewRow(); dr["Chapter"] = dsSelect.Tables[0].Rows[j]["Chapter"].ToString(); dr["ChapterID"] = dsSelect.Tables[0].Rows[j]["ChapterID"].ToString(); dr["TopicID"] = dsSelect.Tables[1].Rows[i]["TopicID"].ToString(); dt2.Rows.Add(dr); } } BindGridData1(dt2); Right = 0; Wrong = 0; } } else { DataTable dt = new DataTable(); grchapterwiseperformance.DataSource = dt; grchapterwiseperformance.DataBind(); } } catch (Exception) { grchapterwiseperformance.DataSource = null; grchapterwiseperformance.DataBind(); } }
//protected void CheckForPackageOffer() //{ // bool IsAllowPackgeOffer = false; // try // { // DataSet dsSettings = new DataSet(); // Teacher_Dashboard_BLogic obj_BAL_Teacher_Dashboard = new Teacher_Dashboard_BLogic(); // dsSettings = obj_BAL_Teacher_Dashboard.BAL_Select_CoveredUncoverChapterTopic_Settings("IsAllowPackgeOffer"); // IsAllowPackgeOffer = Convert.ToBoolean(dsSettings.Tables[0].Rows[0]["value"].ToString()); // AppSessions.IsAllowPackgeOffer = IsAllowPackgeOffer; // } // catch (Exception) // { // } //} protected void GetStudentpackagedetails() { try { obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); obj_Student_Dashboard.StudentID = AppSessions.StudentID; DataSet ds = new DataSet(); ds = obj_BAL_Student_Dashboard.BAL_Student_ExpiryNotification1(obj_Student_Dashboard); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { if (ds.Tables[0].Rows[i]["Price"].ToString() != "0") { decimal cntnoofdays = Convert.ToDecimal((Convert.ToInt32(ds.Tables[0].Rows[i]["NoOfMonth"].ToString())) / 30); int cntnoofmonth = Convert.ToInt32(Math.Round(cntnoofdays)); DateTime dtFromDate = Convert.ToDateTime(ds.Tables[0].Rows[i]["FromDate"].ToString()); DateTime dtvalidtill = dtFromDate.AddMonths(cntnoofmonth).AddDays(-1); ds.Tables[0].Rows[i]["NoOfMonth"] = cntnoofmonth.ToString(); ds.Tables[0].Rows[i]["ValidTill"] = dtvalidtill.ToString(); } } if (ds.Tables[0].Rows.Count > 0 && ds != null) { gvpurchasedpackages.Visible = true; gvpurchasedpackages.DataSource = ds.Tables[0]; gvpurchasedpackages.DataBind(); } gvpurchasedpackages.DataSource = ds.Tables[0]; gvpurchasedpackages.DataBind(); } catch (Exception ex) { WebMsg.Show(ex.Message); } }
public void Applied_Chapter_Topics() { obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); obj_Student_Dashboard.BMSID = Convert.ToInt64(Session["BMSID"]); obj_Student_Dashboard.SubjectID = Convert.ToInt16(Session["SubjectID"]); obj_Student_Dashboard.StudentID = Convert.ToInt64(Session["StudentID"]); obj_Student_Dashboard.Month = Convert.ToInt16(ddlMonthYear.SelectedValue); String[] Year = ddlMonthYear.SelectedItem.ToString().Split('-'); obj_Student_Dashboard.Year = Convert.ToInt32(Year[1]); DataSet dsSelect = new DataSet(); dsSelect = obj_BAL_Student_Dashboard.BAL_Select_Applied_Rescheduling_Data_Of_Student(obj_Student_Dashboard); if (dsSelect.Tables[0].Rows.Count > 0) { grvReschedulingData.DataSource = dsSelect.Tables[0]; grvReschedulingData.DataBind(); } else { grvReschedulingData.DataSource = null; grvReschedulingData.DataBind(); } }
public bool CheckPasswordComplexcity() { bool flag = false; OBLogic_Student = new Student_DashBoard_BLogic(); DataSet dsResult = new DataSet(); dsResult = OBLogic_Student.BAL_Select_PaymentPagesInfo("Password"); string Complexcity = dsResult.Tables[0].Rows[0]["value"].ToString(); if (txtPassword.Text.Length > 0) { if (System.Text.RegularExpressions.Regex.IsMatch(txtPassword.Text, Complexcity)) { //WebMsg.Show("Valid Password"); flag = true; } else { //WebMsg.Show("Invalid Password"); flag = false; } } return(flag); }
private void BindGridData(int index) { if (Session["Topic1"] != null) { DataSet dsResult = new DataSet(); Student_DashBoard_BLogic Student_BAL = new Student_DashBoard_BLogic(); int SubjectID = Convert.ToInt32(Session["SubjectID"].ToString()); int ChapterID = Convert.ToInt32(Session["ChapterID"].ToString()); int TopicID = Convert.ToInt32(Session["TopicID1"].ToString()); int BMSID = Convert.ToInt32(Session["BMSID"].ToString()); int StudentID = Convert.ToInt32(Session["StudentID"].ToString()); string TestType = string.Empty; if (index == 0) { TestType = "Pretest"; } else if (index == 1) { TestType = "Posttest"; } dsResult = Student_BAL.BAL_SelectStudentTestResultwithDetails(SubjectID, ChapterID, TopicID, BMSID, StudentID, TestType); if (dsResult.Tables[0].Rows.Count > 0) { tblTestResult.Visible = true; trError.Visible = false; gvAnalysis.DataSource = dsResult; gvAnalysis.DataBind(); int Right = 0; int Wrong = 0; int count = dsResult.Tables[0].Rows.Count; for (int i = 0; i < count; i++) { if (dsResult.Tables[0].Rows[i]["Result"].ToString() == "True") { Right++; } else if (dsResult.Tables[0].Rows[i]["Result"].ToString() == "False") { Wrong++; } } double per = Convert.ToDouble((100 * Right) / count); lblAverageValue.Text = per.ToString() + " %"; } else { gvAnalysis.DataSource = null; gvAnalysis.DataBind(); trError.Visible = true; tblTestResult.Visible = false; } } }
protected void RenewPackage() { try { string PackageID = (gvpurchasedpackages.SelectedRow.FindControl("lblID") as Label).Text; obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); DataSet ds = new DataSet(); //ds = obj_BAL_Student_Dashboard.BAL_Student_SelectNotAvailablePackage(Convert.ToInt32(AppSessions.BMSID), Convert.ToInt32(dt.Rows[i]["PackageID"].ToString())); //ds = obj_BAL_Student_Dashboard.BAL_Student_SelectNotAvailablePackage(Convert.ToInt32(AppSessions.BMSID), Convert.ToInt32(PackageID)); ds = obj_BAL_Student_Dashboard.BAL_Student_CheckForPackageAvailablity(PackageID); if (ds.Tables.Count > 0) { if (ds.Tables[0].Rows.Count > 0) { lblnotavailablepackage.Text = ""; if (ds.Tables[0].Rows[0]["Price"].ToString() == "0") { lblnotavailablepackage.Text += ds.Tables[0].Rows[0]["PackageName"].ToString() + " Package is for demo only, you can not buy it." + "<br />"; lblnotavailablepackage.Visible = true; } else if (ds.Tables[0].Rows[0]["IsActive"].ToString() == "False") { lblnotavailablepackage.Text += ds.Tables[0].Rows[0]["PackageName"].ToString() + " Package is not available for renew." + "<br />"; lblnotavailablepackage.Visible = true; } } else { if (ds.Tables[1].Rows.Count > 0) { if (Convert.ToDateTime(ds.Tables[1].Rows[0]["OfferEndDate"]) > DateTime.Now) { lblofferdetails.Text = "Congratulations! You will get Vacation offer( " + ds.Tables[1].Rows[0]["OfferName"].ToString() + ") on renewal of this package"; lblofferdetails.ForeColor = System.Drawing.Color.Yellow; lblofferdetails.Attributes.Add("font-size", "20px;"); Session["OfferPackageDays"] = ds.Tables[1].Rows[0]["OfferDays"].ToString(); } } fieldpanel.Visible = true; pnlpackageactivation.Visible = true; rbyes.Checked = true; txtdate.Text = DateTime.Today.ToString("dd-MMM-yyyy"); txtdate.Attributes.Add("readonly", "readonly"); fieldpanel.Visible = true; rbyes.Checked = true; } } } catch (Exception ex) { } }
public void fill_Covered_Chapters_Topics() { obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); obj_Student_Dashboard.BMSID = Convert.ToInt64(Session["BMSID"]); obj_Student_Dashboard.SubjectID = Convert.ToInt16(Session["SubjectID"]); obj_Student_Dashboard.StudentID = Convert.ToInt64(Session["StudentID"]); DataSet dsSelect = new DataSet(); dsSelect = obj_BAL_Student_Dashboard.BAL_Select_Covered_Chapters_Topics(obj_Student_Dashboard); try { grdAttendance.DataSource = dsSelect.Tables[2]; grdAttendance.DataBind(); } catch { grdAttendance.DataSource = null; grdAttendance.DataBind(); } if (dsSelect.Tables.Count == ((int)EnumFile.AssignValue.One)) { if (dsSelect.Tables[0].Rows[0]["NoRecord"].ToString().Equals("0")) { lblLastChapterName.Text = "-"; lblLastTopicName.Text = "-"; } } else if (dsSelect.Tables.Count > ((int)EnumFile.AssignValue.Zero)) { if (dsSelect.Tables[0].Rows.Count > ((int)EnumFile.AssignValue.Zero)) { lblLastChapterName.Text = dsSelect.Tables[0].Rows[0]["Chapter"].ToString(); } else { lblLastChapterName.Text = "-"; } if (dsSelect.Tables[1].Rows.Count > ((int)EnumFile.AssignValue.Zero)) { lblLastTopicName.Text = dsSelect.Tables[1].Rows[0]["Topic"].ToString(); } else { lblLastTopicName.Text = "-"; } } else { lblLastChapterName.Text = "-"; lblLastTopicName.Text = "-"; } }
protected void GetExpiryNotification() { try { if (Session["ShowPaymentPages"].ToString().ToLower() != "no") { obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); //if (Session["UserPackage"] == "Single") //{ obj_Student_Dashboard.StudentID = AppSessions.StudentID; // obj_Student_Dashboard.Mode = "Single"; DataSet ds = new DataSet(); ds = obj_BAL_Student_Dashboard.BAL_Student_ExpiryNotification1(obj_Student_Dashboard); if (ds.Tables[0].Rows.Count > 0 && ds != null) { fsExpiryNotification.Visible = true; gvSubjectExpiryNotification.Visible = true; gvSubjectExpiryNotification.DataSource = ds.Tables[0]; gvSubjectExpiryNotification.DataBind(); } else { Response.Redirect("~/DashBoard/SelectPackage.aspx"); } if (ds.Tables[1].Rows.Count > 0 && ds != null) { gvExpiredPackageList.Visible = true; gvExpiredPackageList.DataSource = ds.Tables[1]; gvExpiredPackageList.DataBind(); } } //} //if (Session["UserPackage"] == "Combo") //{ // obj_Student_Dashboard.StudentID = AppSessions.StudentID; // obj_Student_Dashboard.Mode = "Combo"; // DataSet ds = new DataSet(); // ds = obj_BAL_Student_Dashboard.BAL_Student_ExpiryNotification1(obj_Student_Dashboard); // if (ds.Tables[0].Rows.Count > 0 && ds != null) // { // fsExpiryNotification.Visible = true; // gvComboExpiryNotification.Visible = true; // gvComboExpiryNotification.DataSource = ds.Tables[0]; // gvComboExpiryNotification.DataBind(); // } //} } catch (Exception ex) { WebMsg.Show(ex.Message); } }
public void fill_ALL_Covered_Chaptes_Topics() { obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); obj_Student_Dashboard.BMSID = Convert.ToInt64(Session["BMSID"]); obj_Student_Dashboard.SubjectID = Convert.ToInt16(Session["SubjectID"]); obj_Student_Dashboard.DivisionID = Convert.ToInt16(Session["DivisionID"]); obj_Student_Dashboard.StudentID = Convert.ToInt64(Session["StudentID"]); obj_Student_Dashboard.SchoolID = Convert.ToInt64(Session["SchoolID"]); DataSet dsSelect = new DataSet(); dsSelect = obj_BAL_Student_Dashboard.BAL_Select_Covered_Syllabus(obj_Student_Dashboard); if (dsSelect.Tables.Count == ((int)EnumFile.AssignValue.One)) { if (dsSelect.Tables[0].Rows[0]["NoRecord"].ToString().Equals("0")) { WebMsg.Show("No Chapter available."); DropDownList[] disddl = { ddlChapter, ddlTopic }; DisableDropDwon(disddl); } } else if (dsSelect.Tables.Count > ((int)EnumFile.AssignValue.Zero) && dsSelect.Tables[0].Rows.Count > ((int)EnumFile.AssignValue.Zero)) { ddlChapter.DataSource = dsSelect.Tables[0]; ddlChapter.DataTextField = "Chapter"; ddlChapter.DataValueField = "ChapterID"; ddlChapter.DataBind(); ddlChapter.Items.Insert(Convert.ToInt32(EnumFile.AssignValue.Zero), new ListItem("-- Select --")); ddlChapter.SelectedIndex = Convert.ToInt32(EnumFile.AssignValue.Zero); DropDownList[] disddl = { ddlChapter, ddlTopic }; EnableDropDwon(disddl); ViewState["TopicTable"] = (DataTable)dsSelect.Tables[1]; ddlTopic.DataSource = dsSelect.Tables[1]; ddlTopic.DataTextField = "Topic"; ddlTopic.DataValueField = "TopicID"; ddlTopic.DataBind(); ddlTopic.Items.Insert(Convert.ToInt32(EnumFile.AssignValue.Zero), new ListItem("-- Select --")); ddlTopic.SelectedIndex = Convert.ToInt32(EnumFile.AssignValue.Zero); } else { DropDownList[] disddl = { ddlChapter, ddlTopic }; DisableDropDwon(disddl); } }
protected void GetStudentDetailBMS() { DataSet dsData = new DataSet(); DataSet dsLogin = new DataSet(); obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); ArrayList Alist = new ArrayList(); //int BMSID = 0; try { obj_Student_Dashboard.StudentID = AppSessions.StudentID; //dsData = obj_BAL_Student_Dashboard.BAL_Validate_Student(obj_Student_Dashboard); dsData = obj_BAL_Student_Dashboard.BAL_Student_PackageDetails(AppSessions.StudentID, AppSessions.BMSID); //dsData = obj_BAL_Student_Dashboard.BAL_Student_ExpiryNotification1(obj_Student_Dashboard); if (dsData != null && dsData.Tables.Count > 0) { if (dsData.Tables[0].Rows.Count > 0) { string SubjectID = dsData.Tables[0].Rows[0]["SubjectID"].ToString(); if (SubjectID != string.Empty) { for (int i = 0; i < dsData.Tables[0].Rows.Count; i++) { Alist.Add(dsData.Tables[0].Rows[i]["PackageFD_ID"].ToString()); } ViewState["ArrayList"] = Alist; //Session["UserPackage"] = "Single"; } //else //{ // BMSID = Convert.ToInt32(dsData.Tables[0].Rows[0]["BMSID"].ToString()); // Session["DemoBMS"] = BMSID; // Session["UserPackage"] = "Combo"; //} } else if (dsData.Tables[0].Rows.Count > 1) { Response.Redirect("~/DashBoard/SelectPackage.aspx"); } } else { Response.Redirect("~/DashBoard/SelectPackage.aspx"); } } catch (Exception ex) { WebMsg.Show(ex.Message); } }
public void fill_Covered_Syllabus() { tvSyllabus.Nodes.Clear(); obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); obj_Student_Dashboard.BMSID = Convert.ToInt64(Session["BMSID"]); obj_Student_Dashboard.SubjectID = Convert.ToInt16(Session["SubjectID"]); obj_Student_Dashboard.StudentID = Convert.ToInt64(Session["StudentID"]); DataSet dsSelect = new DataSet(); dsSelect = obj_BAL_Student_Dashboard.BAL_Select_Covered_Syllabus(obj_Student_Dashboard); if (dsSelect.Tables.Count > ((int)EnumFile.AssignValue.Zero)) { DataTable dtChapter = new DataTable(); DataTable dtTopic = new DataTable(); dtChapter = dsSelect.Tables[0]; dtTopic = dsSelect.Tables[1]; if (dtChapter.Rows.Count > ((int)EnumFile.AssignValue.Zero) && dtTopic.Rows.Count > ((int)EnumFile.AssignValue.Zero)) { foreach (DataRow c in dtChapter.Rows) { TreeNode ParentNode = new TreeNode(); ParentNode.Text = c["Chapter"].ToString(); ParentNode.Value = c["ChapterID"].ToString(); tvSyllabus.Nodes.Add(ParentNode); foreach (DataRow d in dtTopic.Select("ChapterID = " + Convert.ToInt32(c["ChapterID"].ToString()))) { TreeNode ChildNode = new TreeNode(); ChildNode.Text = d["Topic"].ToString(); ChildNode.Value = d["TopicID"].ToString(); ParentNode.ChildNodes.Add(ChildNode); } } } else { tvSyllabus.Nodes.Clear(); } } else { tvSyllabus.Nodes.Clear(); } }
protected void btnreset_Click(object sender, EventArgs e) { obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); obj_Student_Dashboard.StudentID = AppSessions.StudentID; DataSet ds = new DataSet(); //ddlpackagetype.SelectedIndex = 0; //ddlsearchby.SelectedIndex = 0; //ddlsearchby.SelectedIndex = 0; //txtfromdate.Text = string.Empty; //txttodate.Text = string.Empty; ds = obj_BAL_Student_Dashboard.BAL_Student_PackageHistory(obj_Student_Dashboard, null, null); //ds = obj_BAL_Student_Dashboard.BAL_Student_PackageHistory(obj_Student_Dashboard, ddlsearchby.SelectedItem.ToString().Trim(), ddlpackagetype.SelectedItem.ToString().Trim()); gvstudentpackagedetails1.DataSource = ds.Tables[0]; gvstudentpackagedetails1.DataBind(); }
private void BindGridData() { try { DataSet dsResult = new DataSet(); Student_DashBoard_BLogic Student_BAL = new Student_DashBoard_BLogic(); int SubjectID = Convert.ToInt32(Session["SubjectID"].ToString()); int ChapterID = Convert.ToInt32(Session["ChapterID"].ToString()); int TopicID = Convert.ToInt32(Session["TopicID1"].ToString()); int BMSID = Convert.ToInt32(Session["BMSID"].ToString()); int StudentID = Convert.ToInt32(Session["StudentID"].ToString()); string TestType = string.Empty; dsResult = Student_BAL.BAL_SelectStudentTestResultwithDetails(SubjectID, ChapterID, TopicID, BMSID, StudentID, TestType); if (dsResult.Tables[0].Rows.Count > 0) { int Right = 0; int Wrong = 0; int count = dsResult.Tables[0].Rows.Count; for (int i = 0; i < count; i++) { if (dsResult.Tables[0].Rows[i]["Result"].ToString() == "True") { Right++; } else if (dsResult.Tables[0].Rows[i]["Result"].ToString() == "False") { Wrong++; } } double per = Convert.ToDouble((100 * Right) / count); } else { } } catch (Exception) { grchapterwiseperformance.DataSource = null; grchapterwiseperformance.DataBind(); } }
protected void GetExpiryNotification() { try { obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); if (Session["UserPackage"] == "Single") { obj_Student_Dashboard.StudentID = AppSessions.StudentID; obj_Student_Dashboard.Mode = "Single"; DataSet ds = new DataSet(); ds = obj_BAL_Student_Dashboard.BAL_Student_ExpiryNotification(obj_Student_Dashboard); if (ds.Tables[0].Rows.Count > 0 && ds != null) { fsExpiryNotification.Visible = true; gvSubjectExpiryNotification.Visible = true; gvSubjectExpiryNotification.DataSource = ds.Tables[0]; gvSubjectExpiryNotification.DataBind(); } } if (Session["UserPackage"] == "Combo") { obj_Student_Dashboard.StudentID = AppSessions.StudentID; obj_Student_Dashboard.Mode = "Combo"; DataSet ds = new DataSet(); ds = obj_BAL_Student_Dashboard.BAL_Student_ExpiryNotification(obj_Student_Dashboard); if (ds.Tables[0].Rows.Count > 0 && ds != null) { fsExpiryNotification.Visible = true; gvComboExpiryNotification.Visible = true; gvComboExpiryNotification.DataSource = ds.Tables[0]; gvComboExpiryNotification.DataBind(); } } } catch (Exception ex) { WebMsg.Show(ex.Message); } }
public void Fill_Chart_Data() { Student_DashBoard_BLogic obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); StudentDash obj_Student_Dashboard = new StudentDash(); obj_Student_Dashboard.BMSID = Convert.ToInt64(Session["BMSID"]); obj_Student_Dashboard.SubjectID = Convert.ToInt16(Session["SubjectID"]); obj_Student_Dashboard.DivisionID = Convert.ToInt16(Session["DivisionID"]); obj_Student_Dashboard.StudentID = Convert.ToInt64(AppSessions.StudentID); obj_Student_Dashboard.SchoolID = Convert.ToInt64(Session["SchoolID"]); DataSet dsSelect = new DataSet(); dsSelect = obj_BAL_Student_Dashboard.BAL_Select_Chart_Data(obj_Student_Dashboard); if (dsSelect.Tables[0].Rows.Count > ((int)EnumFile.AssignValue.Zero)) { LblCoveredChapter.Visible = true; LblUncoveredChapter.Visible = true; Int32 CoveredChapters = Convert.ToInt32(dsSelect.Tables[0].Rows[0]["Covered"].ToString()); Int32 UncoveredChapters = 100 - CoveredChapters; LblCoveredChapter.Width = CoveredChapters * 2; LblUncoveredChapter.Width = UncoveredChapters * 2; lblCovered.Text = Convert.ToString(CoveredChapters) + "%"; lblUncovered.Text = Convert.ToString(UncoveredChapters) + "%"; lblCovered1.Text = Convert.ToString(CoveredChapters) + "%"; lblUncovered1.Text = Convert.ToString(UncoveredChapters) + "%"; } else { LblCoveredChapter.Visible = false; LblUncoveredChapter.Visible = false; LblCoveredChapter.Text = ""; LblUncoveredChapter.Text = ""; } }
private void BindGridPackage() { try { obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); obj_Student_Dashboard.StudentID = AppSessions.StudentID; DataSet ds = new DataSet(); ds = obj_BAL_Student_Dashboard.BAL_Student_PackageHistory(obj_Student_Dashboard, null, null); //ds = obj_BAL_Student_Dashboard.BAL_Student_ExpiredPackageHistory(obj_Student_Dashboard); if (ds.Tables[0].Rows.Count > 0 && ds != null) { gvstudentpackagedetails1.DataSource = ds.Tables[0]; gvstudentpackagedetails1.DataBind(); } } catch (Exception ex) { } }
/// <summary> /// Method wil be used to get product id. /// </summary> /// <returns>Returns string value</returns> public static string GetProductID() { string ProductID = string.Empty; try { Student_DashBoard_BLogic SBlogic = new Student_DashBoard_BLogic(); DataSet dsProduct = new DataSet(); dsProduct = SBlogic.BAL_Select_PaymentPagesInfo("Product"); if (dsProduct != null & dsProduct.Tables.Count > 0) { if (dsProduct.Tables[0].Rows.Count > 0) { ProductID = dsProduct.Tables[0].Rows[0]["value"].ToString(); } } } catch (Exception ex) { WebMsg.Show(ex.Message); } return(ProductID); }
protected void BindSubjectList() { try { obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); obj_Student_Dashboard.BMSID = Convert.ToInt64(Session["BMSID"]); DataSet ds = new DataSet(); ds = obj_BAL_Student_Dashboard.BAL_Student_Subject_Select(obj_Student_Dashboard); if (ds.Tables[0].Rows.Count > 0 && ds != null) { rbSubjectList.DataSource = ds.Tables[0]; rbSubjectList.DataValueField = "SubjectID"; rbSubjectList.DataTextField = "Subject"; rbSubjectList.DataBind(); rbSubjectList.SelectedIndex = 0; } } catch (Exception ex) { WebMsg.Show(ex.Message); } }
protected void BindSubjectList() { try { if (Session["ShowPaymentPages"] != null) { //Session["DemoBMS"] = AppSessions.BMSID; } else { //GetStudentDetailBMS(); } Student_DashBoard_BLogic obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); StudentDash obj_Student_Dashboard = new StudentDash(); ArrayList Alist = new ArrayList(); //if (ViewState["ArrayList"] != null) //{ // Alist = (ArrayList)ViewState["ArrayList"]; // string PackageFDID = string.Empty; // for (int i = 0; i < Alist.Count; i++) // { // if (PackageFDID != string.Empty) // { // PackageFDID = PackageFDID + "," + Alist[i].ToString(); // } // else // { // PackageFDID = PackageFDID + Alist[i].ToString(); // } // } // obj_Student_Dashboard.BMSID = AppSessions.BMSID; // obj_Student_Dashboard.PackageFDID = PackageFDID; // obj_Student_Dashboard.Mode = "Selected"; // DataSet ds = new DataSet(); // //ds = obj_BAL_Student_Dashboard.BAL_Student_Subject_Select(obj_Student_Dashboard); // ds = obj_BAL_Student_Dashboard.BAL_Student_Purchased_Package("", Convert.ToInt32(AppSessions.BMSID), Convert.ToInt32(AppSessions.StudentID)); // DataTable dt = new DataTable(); // dt.Columns.Add("SubjectID", typeof(Int32)); // dt.Columns.Add("Subject", typeof(string)); // if (ds.Tables[0].Rows.Count > 0 && ds != null) // { // for (int i = 0; i < ds.Tables[0].Rows.Count; i++) // { // if (ds.Tables[0].Rows[i]["PackageType"].ToString().ToLower() == "combo") // { // string[] subjects = ds.Tables[0].Rows[i]["subject"].ToString().Split(','); // string[] subjectsid = ds.Tables[0].Rows[i]["subjectid"].ToString().Split(','); // for (int subcnt = 0; subcnt < subjects.Length; subcnt++) // { // DataRow dr = dt.NewRow(); // dr["SubjectID"] = subjectsid[subcnt].ToString().Trim(); // dr["Subject"] = subjects[subcnt].ToString().Trim(); // dt.Rows.Add(dr); // } // } // else // { // DataRow dr = dt.NewRow(); // dr["SubjectID"] = ds.Tables[0].Rows[i]["Subjectid"].ToString().Trim(); // dr["Subject"] = ds.Tables[0].Rows[i]["Subject"].ToString().Trim(); // dt.Rows.Add(dr); // } // } // DataTable dt1 = dt.DefaultView.ToTable(true, "SubjectID", "Subject"); // DataView dv = dt1.DefaultView; // dv.Sort = "Subject"; // dt = dv.ToTable(); // // dt = dt.DefaultView.ToTable(true); // rbSubjectList.DataSource = dt; // rbSubjectList.DataValueField = "SubjectID"; // rbSubjectList.DataTextField = "Subject"; // rbSubjectList.DataBind(); // rbSubjectList.SelectedIndex = 0; // } //} //if (Session["DemoBMS"] != null) if (Session["BMSID"] != null) { obj_Student_Dashboard.BMSID = Convert.ToInt64(Session["BMSID"]); obj_Student_Dashboard.Mode = "All"; DataSet ds = new DataSet(); ds = obj_BAL_Student_Dashboard.BAL_Student_Subject_Select(obj_Student_Dashboard); if (ds.Tables[0].Rows.Count > 0 && ds != null) { rbSubjectList.DataSource = ds.Tables[0]; rbSubjectList.DataValueField = "SubjectID"; rbSubjectList.DataTextField = "Subject"; rbSubjectList.DataBind(); rbSubjectList.SelectedIndex = 0; Session["SubjectID"] = rbSubjectList.SelectedValue; } } } catch (Exception ex) { WebMsg.Show(ex.Message); } }
protected void btnGo_Click(object sender, EventArgs e) { try { if (uctxtUserName.Text == string.Empty || uctxtUserPassword.Text == string.Empty) { WebMsg.Show("Please enter User ID and Password"); } else { StoreCookie(); int status = CheckLogin(); //if (ddlUserType.SelectedValue == "0") if (status == 2) { //WebMsg.Show("invalid username or password"); uctxtUserName.Text = string.Empty; uctxtUserPassword.Text = string.Empty; ucinvalididpassword.Text = "Invalid User ID or Password"; //Page.ClientScript.RegisterStartupScript(GetType(), "msgbox", "alert('FiveDot File uploaded successfully'); ", true); //Response.Write("<script>alert('my message');</script> "); //ScriptManager.RegisterClientScriptBlock(ucbtnGo, this.GetType(), "Alert Message", "<script> alert('invalid username or password');</script>", true); return; } else if (status == 0) { // 0 Indicates Student StudentDash = new StudentDash(); BLogic_Student = new Student_DashBoard_BLogic(); DataSet dtLogin = new DataSet(); DataTable LoginInfo = new DataTable(); DataTable UserInfo = new DataTable(); obj_SYS_Role = new SYS_Role(); obj_BAL_SYS_Role = new SYS_Role_BLogic(); obj_SYS_Role.Username = uctxtUserName.Text; obj_SYS_Role.Password = uctxtUserPassword.Text; //obj_SYS_Role.roleid = Convert.ToInt16(DdlRole.SelectedValue); //if (uctxtEmail.Text != "" && uctxtpass.Text != "") //{ dtLogin = obj_BAL_SYS_Role.BAL_SYS_Student_Login(obj_SYS_Role); LoginInfo = dtLogin.Tables[0]; //} if (LoginInfo.Rows.Count > 0 && LoginInfo != null) { AppSessions.AppUserType = "Student"; AppSessions.StudentID = Convert.ToInt32(LoginInfo.Rows[0]["StudentID"].ToString()); AppSessions.UserName = LoginInfo.Rows[0]["FirstName"].ToString(); AppSessions.LoginID = LoginInfo.Rows[0]["LoginID"].ToString(); AppSessions.BMSID = Convert.ToInt32(LoginInfo.Rows[0]["BMSID"].ToString()); AppSessions.BMS = LoginInfo.Rows[0]["BMS"].ToString(); AppSessions.BoardID = Convert.ToInt32(LoginInfo.Rows[0]["BoardID"].ToString()); AppSessions.Board = LoginInfo.Rows[0]["Board"].ToString(); AppSessions.MediumID = Convert.ToInt32(LoginInfo.Rows[0]["MediumID"].ToString()); AppSessions.Medium = LoginInfo.Rows[0]["Medium"].ToString(); AppSessions.StandardID = Convert.ToInt32(LoginInfo.Rows[0]["StandardID"].ToString()); AppSessions.Standard = LoginInfo.Rows[0]["Standard"].ToString(); AppSessions.DivisionID = Convert.ToInt32(LoginInfo.Rows[0]["DivisionID"].ToString()); //AppSessions.Division = LoginInfo.Rows[0]["Division"].ToString(); AppSessions.SchoolID = Convert.ToInt32(LoginInfo.Rows[0]["SchoolID"].ToString()); //AppSessions.SchoolName = LoginInfo.Rows[0]["SchoolName"].ToString(); AppSessions.Role = LoginInfo.Rows[0]["Role"].ToString(); AppSessions.RoleID = Convert.ToInt32(LoginInfo.Rows[0]["RoleID"].ToString()); AppSessions.IsFreePackage = IsFreePackage(); //AppSessions.EmailID = Convert.ToString(LoginInfo.Rows[0]["EmailID"]); //yourLoginMethodStudent(LoginInfo); bool AllowMultipleSession = false; AllowMultipleSession = Convert.ToBoolean(LoginInfo.Rows[0]["AllowMultipleSession"].ToString()); //Hashtable sessions1 = (Hashtable)Application["WEB_SESSIONS_OBJECT"]; //HttpSessionState existingUserSession1 = (HttpSessionState)sessions1[Session["StudentID"].ToString()]; //if (existingUserSession1 != null) //{ // Response.Redirect("../Dashboard/StudentDashboard.aspx"); //} if (AllowMultipleSession == false) { Hashtable sessions = (Hashtable)Application["WEB_SESSIONS_OBJECT"]; if (sessions == null) { sessions = new Hashtable(); } HttpSessionState existingUserSession = (HttpSessionState)sessions[Session["StudentID"].ToString()]; if (existingUserSession != null) { ////existingUserSession[Session["EmpolyeeID"].ToString()] = null; //logout current logged in user Session["StudentID"] = null; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", "<script>alert('You are already Logged In.')</script>", false); return; } } ////////getting the pointer to the Session of the current logged in user yourLoginMethodStudent(LoginInfo); ProceedToRedirectPage(LoginInfo); bool AllowPayment = false; DataSet dsPaymentInfo = new DataSet(); dsPaymentInfo = BLogic_Student.BAL_Select_PaymentPagesInfo("Payment"); if (dsPaymentInfo != null & dsPaymentInfo.Tables.Count > 0) { if (dsPaymentInfo.Tables[0].Rows.Count > 0) { string a = dsPaymentInfo.Tables[0].Rows[0]["value"].ToString(); if (a == "0") { AllowPayment = false; } else { AllowPayment = true; } } } DataSet ds = new DataSet(); StudentDash.StudentID = AppSessions.StudentID; //ds = BLogic_Student.BAL_Validate_Student(StudentDash); ds = BLogic_Student.BAL_Validate_Student_Package(StudentDash); TrackLog_Utils.Log(Convert.ToInt32(AppSessions.SchoolID), Convert.ToInt32(AppSessions.EmployeeOrStudentID), Convert.ToInt16(AppSessions.DivisionID), "Login", "btnLogin", "Click", Convert.ToDateTime(System.DateTime.Now), HttpContext.Current.Session.SessionID, StringEnum.stringValueOf(EnumFile.Activity.LoginSuccess), "LoginId: " + uctxtUserName.Text, 0); if (AllowPayment == true) { //Session["ShowPaymentPages"] = "yes"; if (ds != null && dtLogin.Tables.Count > 0) { if (ds.Tables[0].Rows.Count > 0) { Session["CheckValidity"] = "Yes"; ProceedToRedirect(); } else { Response.Redirect("~/DashBoard/SelectPackage.aspx", false); TrackLog_Utils.Log(Convert.ToInt32(AppSessions.SchoolID), Convert.ToInt32(AppSessions.EmployeeOrStudentID), Convert.ToInt16(AppSessions.DivisionID), "Login", "btnLogin", "Click", Convert.ToDateTime(System.DateTime.Now), HttpContext.Current.Session.SessionID, StringEnum.stringValueOf(EnumFile.Activity.PackageSelection), "LoginId: " + uctxtUserName.Text, 0); } } else { Response.Redirect("~/DashBoard/SelectPackage.aspx", false); TrackLog_Utils.Log(Convert.ToInt32(AppSessions.SchoolID), Convert.ToInt32(AppSessions.EmployeeOrStudentID), Convert.ToInt16(AppSessions.DivisionID), "Login", "btnLogin", "Click", Convert.ToDateTime(System.DateTime.Now), HttpContext.Current.Session.SessionID, StringEnum.stringValueOf(EnumFile.Activity.PackageSelection), "LoginId: " + uctxtUserName.Text, 0); } } else { Session["CheckValidity"] = "Yes"; Session["ShowPaymentPages"] = "No"; ProceedToRedirect(); } } } //else if (ddlUserType.SelectedValue == "1") else if (status == 1) { // 1 Indicates Teacher DataSet dtLogin = new DataSet(); DataTable LoginInfo = new DataTable(); DataTable UserInfo = new DataTable(); obj_SYS_Role = new SYS_Role(); obj_BAL_SYS_Role = new SYS_Role_BLogic(); obj_SYS_Role.Username = uctxtUserName.Text; obj_SYS_Role.Password = uctxtUserPassword.Text; //obj_SYS_Role.roleid = Convert.ToInt16(DdlRole.SelectedValue); dtLogin = obj_BAL_SYS_Role.BAL_SYS_Active_Login(obj_SYS_Role); LoginInfo = dtLogin.Tables[0]; if (LoginInfo.Rows.Count > 0 && LoginInfo != null && LoginInfo.Rows[0]["Status"].ToString().Equals("1")) { if (dtLogin.Tables[1].Rows[0]["RoleID"].ToString() != "3") { bool AllowMultipleSession = false; UserInfo = dtLogin.Tables[1]; if (UserInfo.Rows.Count > 0 && UserInfo != null) { AppSessions.AppUserType = "School"; AppSessions.EmpolyeeID = int.Parse(UserInfo.Rows[0]["EmployeeID"].ToString()); AppSessions.RoleID = int.Parse(UserInfo.Rows[0]["RoleID"].ToString()); AppSessions.SchoolID = int.Parse(UserInfo.Rows[0]["SchoolID"].ToString()); AppSessions.UserName = UserInfo.Rows[0]["FirstName"].ToString(); AppSessions.SchoolName = UserInfo.Rows[0]["Name"].ToString(); AppSessions.Role = UserInfo.Rows[0]["Role"].ToString(); AllowMultipleSession = Convert.ToBoolean(UserInfo.Rows[0]["AllowMultipleSession"].ToString()); TrackLog_Utils.Log(Convert.ToInt32(AppSessions.SchoolID), Convert.ToInt32(AppSessions.EmpolyeeID), Convert.ToInt16(AppSessions.DivisionID), "LoginPage", "btnLogin", "Click", Convert.ToDateTime(System.DateTime.Now), HttpContext.Current.Session.SessionID, StringEnum.stringValueOf(EnumFile.Activity.LoginSuccess), "LoginId: " + uctxtUserName.Text, 0); } if (AllowMultipleSession == false) { Hashtable sessions = (Hashtable)Application["WEB_SESSIONS_OBJECT"]; if (sessions == null) { sessions = new Hashtable(); } ////////getting the pointer to the Session of the current logged in user HttpSessionState existingUserSession = (HttpSessionState)sessions[Session["EmpolyeeID"].ToString()]; if (existingUserSession != null) { ////existingUserSession[Session["EmpolyeeID"].ToString()] = null; //logout current logged in user } else { yourLoginMethod(UserInfo); ProceedToRedirectPage(UserInfo); } } else { yourLoginMethod(UserInfo); ProceedToRedirectPage(UserInfo); } } else { // For Teacher Redirection bool AllowMultipleSession = false; UserInfo = dtLogin.Tables[1]; if (UserInfo.Rows.Count > 0 && UserInfo != null) { Session["UserInfoTable"] = UserInfo; ViewState["AppUserType"] = "School"; ViewState["EmpolyeeID"] = int.Parse(UserInfo.Rows[0]["EmployeeID"].ToString()); ViewState["RoleID"] = int.Parse(UserInfo.Rows[0]["RoleID"].ToString()); ViewState["SchoolID"] = int.Parse(UserInfo.Rows[0]["SchoolID"].ToString()); ViewState["UserName"] = UserInfo.Rows[0]["FirstName"].ToString(); ViewState["SchoolName"] = UserInfo.Rows[0]["Name"].ToString(); ViewState["Role"] = UserInfo.Rows[0]["Role"].ToString(); AllowMultipleSession = Convert.ToBoolean(UserInfo.Rows[0]["AllowMultipleSession"].ToString()); TrackLog_Utils.Log(Convert.ToInt32(ViewState["SchoolID"]), Convert.ToInt32(ViewState["EmpolyeeID"]), Convert.ToInt16(AppSessions.DivisionID), "LoginMasterPage.master", "ucbtnGo", "Click", Convert.ToDateTime(System.DateTime.Now), HttpContext.Current.Session.SessionID, StringEnum.stringValueOf(EnumFile.Activity.LoginSuccess), ViewState["UserName"] + " (" + uctxtUserName.Text + ") From " + ViewState["SchoolName"] + " school Logged in.", 0); } if (AllowMultipleSession == false) { Hashtable sessions = (Hashtable)Application["WEB_SESSIONS_OBJECT"]; if (sessions == null) { sessions = new Hashtable(); } ////////getting the pointer to the Session of the current logged in user // HttpSessionState existingUserSession = (HttpSessionState)sessions[Session["EmpolyeeID"].ToString()]; HttpSessionState existingUserSession = (HttpSessionState)sessions[ViewState["EmpolyeeID"].ToString()]; if (existingUserSession != null) { WebMsg.Show("This user is already logged in"); } else { yourLoginMethod(UserInfo); ProceedToRedirectPage(UserInfo); } } else { yourLoginMethod(UserInfo); ProceedToRedirectPage(UserInfo); } } } else { TrackLog_Utils.Log(Convert.ToInt32(AppSessions.SchoolID), Convert.ToInt32(AppSessions.EmpolyeeID), Convert.ToInt16(AppSessions.DivisionID), "LoginPage", "btnLogin", "Click", Convert.ToDateTime(System.DateTime.Now), HttpContext.Current.Session.SessionID, StringEnum.stringValueOf(EnumFile.Activity.LoginFailed), "LoginId: " + uctxtUserName.Text + " , Password: "******"Authentication Failed,unable to login"); } } uctxtUserName.Text = string.Empty; uctxtUserPassword.Text = string.Empty; } } catch (Exception ex) { WebMsg.Show(ex.Message); } }
protected void btnGo_Click(object sender, EventArgs e) { try { StoreCookie(); int status = CheckLogin(); //if (ddlUserType.SelectedValue == "0") if (status == 2) { WebMsg.Show("invalid username or password"); return; } else if (status == 0) { // 0 Indicates Student StudentDash = new StudentDash(); BLogic_Student = new Student_DashBoard_BLogic(); DataSet dtLogin = new DataSet(); DataTable LoginInfo = new DataTable(); DataTable UserInfo = new DataTable(); obj_SYS_Role = new SYS_Role(); obj_BAL_SYS_Role = new SYS_Role_BLogic(); obj_SYS_Role.Username = txtUserName.Text; obj_SYS_Role.Password = txtUserPassword.Text; //obj_SYS_Role.roleid = Convert.ToInt16(DdlRole.SelectedValue); dtLogin = obj_BAL_SYS_Role.BAL_SYS_Student_Login(obj_SYS_Role); LoginInfo = dtLogin.Tables[0]; if (LoginInfo.Rows.Count > 0 && LoginInfo != null) { AppSessions.AppUserType = "Student"; AppSessions.StudentID = Convert.ToInt32(LoginInfo.Rows[0]["StudentID"].ToString()); AppSessions.UserName = LoginInfo.Rows[0]["FirstName"].ToString(); AppSessions.BMSID = Convert.ToInt32(LoginInfo.Rows[0]["BMSID"].ToString()); AppSessions.BMS = LoginInfo.Rows[0]["BMS"].ToString(); AppSessions.BoardID = Convert.ToInt32(LoginInfo.Rows[0]["BoardID"].ToString()); AppSessions.Board = LoginInfo.Rows[0]["Board"].ToString(); AppSessions.MediumID = Convert.ToInt32(LoginInfo.Rows[0]["MediumID"].ToString()); AppSessions.Medium = LoginInfo.Rows[0]["Medium"].ToString(); AppSessions.StandardID = Convert.ToInt32(LoginInfo.Rows[0]["StandardID"].ToString()); AppSessions.Standard = LoginInfo.Rows[0]["Standard"].ToString(); AppSessions.DivisionID = Convert.ToInt32(LoginInfo.Rows[0]["DivisionID"].ToString()); //AppSessions.Division = LoginInfo.Rows[0]["Division"].ToString(); AppSessions.SchoolID = Convert.ToInt32(LoginInfo.Rows[0]["SchoolID"].ToString()); //AppSessions.SchoolName = LoginInfo.Rows[0]["SchoolName"].ToString(); AppSessions.Role = LoginInfo.Rows[0]["Role"].ToString(); AppSessions.RoleID = Convert.ToInt32(LoginInfo.Rows[0]["RoleID"].ToString()); yourLoginMethodStudent(LoginInfo); bool AllowPayment = false; DataSet dsPaymentInfo = new DataSet(); dsPaymentInfo = BLogic_Student.BAL_Select_PaymentPagesInfo("Payment"); if (dsPaymentInfo != null & dsPaymentInfo.Tables.Count > 0) { if (dsPaymentInfo.Tables[0].Rows.Count > 0) { string a = dsPaymentInfo.Tables[0].Rows[0]["value"].ToString(); if (a == "0") { AllowPayment = false; } else { AllowPayment = true; } } } DataSet ds = new DataSet(); StudentDash.StudentID = AppSessions.StudentID; // ds = BLogic_Student.BAL_Validate_Student(StudentDash); ds = BLogic_Student.BAL_Validate_Student_Package(StudentDash); if (AllowPayment == true) { if (ds != null && dtLogin.Tables.Count > 0) { if (ds.Tables[0].Rows.Count > 0) { Session["CheckValidity"] = "Yes"; ProceedToRedirect(); } else { Response.Redirect("~/DashBoard/SelectPackage.aspx"); } } else { Response.Redirect("~/DashBoard/SelectPackage.aspx"); } } else { Session["CheckValidity"] = "Yes"; Session["ShowPaymentPages"] = "No"; ProceedToRedirect(); } } } else if (status == 1) { // 1 Indicates Teacher DataSet dtLogin = new DataSet(); DataTable LoginInfo = new DataTable(); DataTable UserInfo = new DataTable(); obj_SYS_Role = new SYS_Role(); obj_BAL_SYS_Role = new SYS_Role_BLogic(); obj_SYS_Role.Username = txtUserName.Text; obj_SYS_Role.Password = txtUserPassword.Text; //obj_SYS_Role.roleid = Convert.ToInt16(DdlRole.SelectedValue); dtLogin = obj_BAL_SYS_Role.BAL_SYS_Active_Login(obj_SYS_Role); LoginInfo = dtLogin.Tables[0]; if (LoginInfo.Rows.Count > 0 && LoginInfo != null && LoginInfo.Rows[0]["Status"].ToString().Equals("1")) { if (dtLogin.Tables[1].Rows[0]["RoleID"].ToString() != "3") { bool AllowMultipleSession = false; UserInfo = dtLogin.Tables[1]; if (UserInfo.Rows.Count > 0 && UserInfo != null) { AppSessions.AppUserType = "School"; AppSessions.EmpolyeeID = int.Parse(UserInfo.Rows[0]["EmployeeID"].ToString()); AppSessions.RoleID = int.Parse(UserInfo.Rows[0]["RoleID"].ToString()); AppSessions.SchoolID = int.Parse(UserInfo.Rows[0]["SchoolID"].ToString()); AppSessions.UserName = UserInfo.Rows[0]["FirstName"].ToString(); AppSessions.SchoolName = UserInfo.Rows[0]["Name"].ToString(); AppSessions.Role = UserInfo.Rows[0]["Role"].ToString(); AllowMultipleSession = Convert.ToBoolean(UserInfo.Rows[0]["AllowMultipleSession"].ToString()); TrackLog_Utils.Log(Convert.ToInt32(AppSessions.SchoolID), Convert.ToInt32(AppSessions.EmpolyeeID), Convert.ToInt16(AppSessions.DivisionID), "LoginPage", "btnLogin", "Click", Convert.ToDateTime(System.DateTime.Now), HttpContext.Current.Session.SessionID, StringEnum.stringValueOf(EnumFile.Activity.LoginSuccess), "LoginId: " + txtUserName.Text, 0); } if (AllowMultipleSession == false) { Hashtable sessions = (Hashtable)Application["WEB_SESSIONS_OBJECT"]; if (sessions == null) { sessions = new Hashtable(); } ////////getting the pointer to the Session of the current logged in user HttpSessionState existingUserSession = (HttpSessionState)sessions[Session["EmpolyeeID"].ToString()]; if (existingUserSession != null) { ////existingUserSession[Session["EmpolyeeID"].ToString()] = null; //logout current logged in user lblError1.Visible = true; } else { yourLoginMethod(UserInfo); ProceedToRedirectPage(UserInfo); } } else { yourLoginMethod(UserInfo); ProceedToRedirectPage(UserInfo); } } else { // For Teacher Redirection bool AllowMultipleSession = false; UserInfo = dtLogin.Tables[1]; if (UserInfo.Rows.Count > 0 && UserInfo != null) { Session["UserInfoTable"] = UserInfo; ViewState["AppUserType"] = "School"; ViewState["EmpolyeeID"] = int.Parse(UserInfo.Rows[0]["EmployeeID"].ToString()); ViewState["RoleID"] = int.Parse(UserInfo.Rows[0]["RoleID"].ToString()); ViewState["SchoolID"] = int.Parse(UserInfo.Rows[0]["SchoolID"].ToString()); ViewState["UserName"] = UserInfo.Rows[0]["FirstName"].ToString(); ViewState["SchoolName"] = UserInfo.Rows[0]["Name"].ToString(); ViewState["Role"] = UserInfo.Rows[0]["Role"].ToString(); AllowMultipleSession = Convert.ToBoolean(UserInfo.Rows[0]["AllowMultipleSession"].ToString()); TrackLog_Utils.Log(Convert.ToInt32(AppSessions.SchoolID), Convert.ToInt32(AppSessions.EmpolyeeID), Convert.ToInt16(AppSessions.DivisionID), "LoginPage", "btnLogin", "Click", Convert.ToDateTime(System.DateTime.Now), HttpContext.Current.Session.SessionID, StringEnum.stringValueOf(EnumFile.Activity.LoginSuccess), "LoginId: " + txtUserName.Text, 0); } if (AllowMultipleSession == false) { Hashtable sessions = (Hashtable)Application["WEB_SESSIONS_OBJECT"]; if (sessions == null) { sessions = new Hashtable(); } ////////getting the pointer to the Session of the current logged in user // HttpSessionState existingUserSession = (HttpSessionState)sessions[Session["EmpolyeeID"].ToString()]; HttpSessionState existingUserSession = (HttpSessionState)sessions[ViewState["EmpolyeeID"].ToString()]; if (existingUserSession != null) { ////existingUserSession[Session["EmpolyeeID"].ToString()] = null; //logout current logged in user lblError1.Visible = true; } else { yourLoginMethod(UserInfo); ProceedToRedirectPage(UserInfo); } } else { yourLoginMethod(UserInfo); ProceedToRedirectPage(UserInfo); } } } else { TrackLog_Utils.Log(Convert.ToInt32(AppSessions.SchoolID), Convert.ToInt32(AppSessions.EmpolyeeID), Convert.ToInt16(AppSessions.DivisionID), "LoginPage", "btnLogin", "Click", Convert.ToDateTime(System.DateTime.Now), HttpContext.Current.Session.SessionID, StringEnum.stringValueOf(EnumFile.Activity.LoginFailed), "LoginId: " + txtUserName.Text + " , Password: "******"Authentication Failed,unable to login"); } } } catch (Exception ex) { WebMsg.Show(ex.Message); } }
protected void FillAllNotPurchasedPackageList() { try { string strcountryname = string.Empty; obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); DataSet ds = new DataSet(); DataSet dsSettings = new DataSet(); Teacher_Dashboard_BLogic obj_BAL_Teacher_Dashboard = new Teacher_Dashboard_BLogic(); dsSettings = obj_BAL_Teacher_Dashboard.BAL_Select_CoveredUncoverChapterTopic_Settings("IsMultiCurrency"); string IsMultiCurrency = dsSettings.Tables[0].Rows[0]["value"].ToString().Trim(); if (IsMultiCurrency.ToLower() == "yes") { strcountryname = GetCountryName(); ds = obj_BAL_Student_Dashboard.BAL_Student_ALL_Not_Purchased_Package(AppSessions.BMSID, AppSessions.StudentID, Session["CurrencyType"].ToString()); } else { strcountryname = "India"; Session["CurrencyType"] = "INR"; Session["country_name"] = "India"; ds = obj_BAL_Student_Dashboard.BAL_Student_ALL_Not_Purchased_Package(AppSessions.BMSID, AppSessions.StudentID, Session["CurrencyType"].ToString()); } //if (strcountryname.ToString().Trim().ToLower() == "india") //{ //} //else if (strcountryname.ToString().Trim().ToLower() == "united states") //{ //ds = obj_BAL_Student_Dashboard.BAL_Student_ALL_Not_Purchased_Package(AppSessions.BMSID, AppSessions.StudentID, "USD"); //} bool IsPackageOffer = false; if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { ds.Tables[0].Columns.Add("ValidTill", typeof(string)); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { if (Convert.ToDateTime(ds.Tables[0].Rows[i]["OfferEndDate"]) > DateTime.Now) { IsPackageOffer = true; break; } { IsPackageOffer = false; } } for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { if (Convert.ToDateTime(ds.Tables[0].Rows[i]["OfferEndDate"]) > DateTime.Now) { decimal cntnoofdays = Convert.ToDecimal((Convert.ToInt32(ds.Tables[0].Rows[i]["NoOfMonth"].ToString())) / 30); int cntnoofmonth = Convert.ToInt32(Math.Round(cntnoofdays)); DateTime dtFromDate = Convert.ToDateTime(DateTime.Today); DateTime dtvalidtill = dtFromDate.AddMonths(cntnoofmonth); dtvalidtill = dtvalidtill.AddDays(-1); //ds.Tables[0].Rows[i]["ValidTill"] = dtvalidtill.ToString("dd-MMM-yyyy"); if (Convert.ToInt32(ds.Tables[0].Rows[i]["OfferDays"].ToString()) <= 29) { dtvalidtill = dtvalidtill.AddDays(Convert.ToInt32(ds.Tables[0].Rows[i]["OfferDays"].ToString())); ds.Tables[0].Rows[i]["ValidTill"] = dtvalidtill.ToString("dd-MMM-yyyy"); } else { decimal cntnoofofferdays = Convert.ToDecimal((Convert.ToInt32(ds.Tables[0].Rows[i]["OfferDays"].ToString())) / 30); int cntnoofoffermonth = Convert.ToInt32(Math.Round(cntnoofofferdays)); ds.Tables[0].Rows[i]["ValidTill"] = dtvalidtill.AddMonths(cntnoofoffermonth).ToString("dd-MMM-yyyy"); } ds.Tables[0].Rows[i]["NoOfMonth"] = cntnoofmonth.ToString(); } else { decimal cntnoofdays = Convert.ToDecimal((Convert.ToInt32(ds.Tables[0].Rows[i]["NoOfMonth"].ToString())) / 30); int cntnoofmonth = Convert.ToInt32(Math.Round(cntnoofdays)); DateTime dtFromDate = Convert.ToDateTime(DateTime.Today); DateTime dtvalidtill = dtFromDate.AddMonths(cntnoofmonth); dtvalidtill = dtvalidtill.AddDays(-1); ds.Tables[0].Rows[i]["NoOfMonth"] = cntnoofmonth.ToString(); ds.Tables[0].Rows[i]["ValidTill"] = dtvalidtill.ToString("dd-MMM-yyyy"); ds.Tables[0].Rows[i]["OfferName"] = "N/A"; } } } if (ds.Tables.Count > 0 && ds != null) { if (IsPackageOffer) { gvallpackage.DataSource = ds.Tables[0]; gvallpackage.DataBind(); } else { gvallpackage.DataSource = ds.Tables[0]; gvallpackage.DataBind(); gvallpackage.Columns[3].Visible = false; } } //if (IsForAllPackage) //{ // if (ds.Tables[0].Rows.Count > 0 && ds != null) // { // gvOffer.DataSource = ds.Tables[0]; // gvOffer.DataBind(); // } // else // { // gvOffer.DataSource = ds.Tables[0]; // gvOffer.DataBind(); // } //} //else //{ // if (ds.Tables[0].Rows.Count > 0 && ds != null) // { // gvallpackage.DataSource = ds.Tables[0]; // gvallpackage.DataBind(); // } // else // { // gvallpackage.DataSource = ds.Tables[0]; // gvallpackage.DataBind(); // } //} } catch (Exception ex) { //WebMsg.Show(ex.Message); } }
public void FillChapters_Topic() { obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); obj_Student_Dashboard.BMSID = Convert.ToInt64(Session["BMSID"]); obj_Student_Dashboard.SubjectID = Convert.ToInt16(Session["SubjectID"]); obj_Student_Dashboard.StudentID = Convert.ToInt64(Session["StudentID"]); // DataSet dsSettings = new DataSet(); dsSettings = obj_BAL_Student_Dashboard.BAL_Select_CoveredUncoverChapterTopic_Settings(); IsAllow_Enable_Settings(dsSettings); DataSet dsSelect = new DataSet(); dsSelect = obj_BAL_Student_Dashboard.BAL_Select_Chapters_Topics(obj_Student_Dashboard); if (dsSelect.Tables.Count == ((int)EnumFile.AssignValue.One)) { if (dsSelect.Tables[0].Rows[0]["NoRecord"].ToString().Equals("0")) { WebMsg.Show("No Chatper availbale."); DropDownList[] disddl = { ddlChapter, ddlTopic }; DisableDropDwon(disddl); } } else if (dsSelect.Tables.Count > ((int)EnumFile.AssignValue.Zero) && dsSelect.Tables[0].Rows.Count > ((int)EnumFile.AssignValue.Zero)) { ddlChapter.DataSource = dsSelect.Tables[0]; ddlChapter.DataTextField = "Chapter"; ddlChapter.DataValueField = "ChapterID"; ddlChapter.DataBind(); ddlChapter.Items.Insert(Convert.ToInt32(EnumFile.AssignValue.Zero), new ListItem("-- Select --")); //DropDownList[] disddl = { ddlChapter, ddlTopic }; //EnableDropDwon(disddl); if (dsSelect.Tables[2].Rows.Count > ((int)EnumFile.AssignValue.Zero)) { if (dsSelect.Tables[2].Rows[0]["ChapterID"].ToString().Equals("")) { ddlChapter.SelectedIndex = ((int)EnumFile.AssignValue.Zero); } else { ddlChapter.SelectedValue = dsSelect.Tables[2].Rows[0]["ChapterID"].ToString(); } } //DropDownList[] disddl1 = { ddlTopic }; //DisableDropDwon(disddl1); ViewState["TopicTable"] = (DataTable)dsSelect.Tables[1]; ddlTopic.DataSource = dsSelect.Tables[1]; ddlTopic.DataTextField = "Topic"; ddlTopic.DataValueField = "TopicID"; ddlTopic.DataBind(); ddlTopic.Items.Insert(Convert.ToInt32(EnumFile.AssignValue.Zero), new ListItem("-- Select --")); ddlTopic.SelectedIndex = Convert.ToInt32(EnumFile.AssignValue.Zero); if (dsSelect.Tables[3].Rows.Count > ((int)EnumFile.AssignValue.Zero)) { if (dsSelect.Tables[3].Rows[0]["TopicID"].ToString().Equals("")) { ddlTopic.SelectedIndex = ((int)EnumFile.AssignValue.Zero); } else { ViewState["TopicID"] = dsSelect.Tables[3].Rows[0]["TopicID"].ToString(); ddlTopic.SelectedValue = dsSelect.Tables[3].Rows[0]["TopicID"].ToString(); } } } else { DropDownList[] disddl = { ddlChapter, ddlTopic }; DisableDropDwon(disddl); } }
private void BindGridData1(DataTable dt) { try { DataSet dsResult = new DataSet(); double per = 0.0; if (dt.Rows.Count > 0) { int count = 1; for (int k = 0; k < dt.Rows.Count; k++) { int ChapterID = Convert.ToInt32(dt.Rows[k]["ChapterID"]); int TopicID = Convert.ToInt32(dt.Rows[k]["TopicID"]); Student_DashBoard_BLogic Student_BAL = new Student_DashBoard_BLogic(); int SubjectID = Convert.ToInt32(ddlsubject.SelectedValue); int BMSID = Convert.ToInt32(Session["BMSID"].ToString()); int StudentID = Convert.ToInt32(Session["StudentID"].ToString()); string TestType = string.Empty; TestType = "Posttest"; dsResult = Student_BAL.BAL_SelectStudentTestResultwithDetails(SubjectID, ChapterID, TopicID, BMSID, StudentID, TestType); if (dsResult.Tables[0].Rows.Count > 0) { count += dsResult.Tables[0].Rows.Count; for (int i = 0; i < dsResult.Tables[0].Rows.Count; i++) { if (dsResult.Tables[0].Rows[i]["Result"].ToString() == "True") { Right++; } else if (dsResult.Tables[0].Rows[i]["Result"].ToString() == "False") { Wrong++; } } } per = Convert.ToDouble((100 * Right) / (count - 1)); } if (Right == 0 && Wrong == 0) { } else { DataRow dr; dr = dt1.NewRow(); dr["Chapter"] = dt.Rows[0]["Chapter"].ToString(); dr["Persentage"] = per.ToString() + "%"; dt1.Rows.Add(dr); grchapterwiseperformance.DataSource = dt1; grchapterwiseperformance.DataBind(); } if (dt1.Rows.Count == 0) { grchapterwiseperformance.DataSource = dt1; grchapterwiseperformance.DataBind(); } } } catch (Exception) { grchapterwiseperformance.DataSource = null; grchapterwiseperformance.DataBind(); } }
protected void BindSubjectList() { try { //if (Session["ShowPaymentPages"] != null) //{ ViewState["StudentBMS"] = AppSessions.BMSID; //} //else //{ // GetStudentDetailBMS(); //} obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); ArrayList Alist = new ArrayList(); if (ViewState["ArrayList"] != null) { Alist = (ArrayList)ViewState["ArrayList"]; string PackageFDID = string.Empty; for (int i = 0; i < Alist.Count; i++) { if (PackageFDID != string.Empty) { PackageFDID = PackageFDID + "," + Alist[i].ToString(); } else { PackageFDID = PackageFDID + Alist[i].ToString(); } } obj_Student_Dashboard.BMSID = AppSessions.BMSID; obj_Student_Dashboard.PackageFDID = PackageFDID; obj_Student_Dashboard.Mode = "Selected"; DataSet ds = new DataSet(); ds = obj_BAL_Student_Dashboard.BAL_Student_Subject_Select(obj_Student_Dashboard); if (ds.Tables[0].Rows.Count > 0 && ds != null) { ddlsubject.DataSource = ds.Tables[0]; ddlsubject.DataValueField = "SubjectID"; ddlsubject.DataTextField = "Subject"; ddlsubject.DataBind(); ddlsubject.SelectedIndex = 0; } ddlsubject.Items.Insert(0, "Select"); } if (ViewState["StudentBMS"] != null) { obj_Student_Dashboard.BMSID = Convert.ToInt64(ViewState["StudentBMS"]); obj_Student_Dashboard.Mode = "All"; DataSet ds = new DataSet(); ds = obj_BAL_Student_Dashboard.BAL_Student_Subject_Select(obj_Student_Dashboard); if (ds.Tables[0].Rows.Count > 0 && ds != null) { ddlsubject.DataSource = ds.Tables[0]; ddlsubject.DataValueField = "SubjectID"; ddlsubject.DataTextField = "Subject"; ddlsubject.DataBind(); } ddlsubject.Items.Insert(0, "Select"); ddlsubject.SelectedIndex = 0; } } catch (Exception ex) { WebMsg.Show(ex.Message); } }
//public void ShowMessage(string message) //{ // this.lblMessage.Text = message; // ModalMessageExtender.Show(); //} protected void RedirectToDashboard() { try { // 0 Indicates Student StudentDash = new StudentDash(); BLogic_Student = new Student_DashBoard_BLogic(); DataSet dtLogin = new DataSet(); DataTable LoginInfo = new DataTable(); DataTable UserInfo = new DataTable(); obj_SYS_Role = new SYS_Role(); obj_BAL_SYS_Role = new SYS_Role_BLogic(); obj_SYS_Role.Username = txtEmail.Text; obj_SYS_Role.Password = ViewState["strpassword"].ToString(); //obj_SYS_Role.roleid = Convert.ToInt16(DdlRole.SelectedValue); //if (uctxtEmail.Text != "" && uctxtpass.Text != "") //{ dtLogin = obj_BAL_SYS_Role.BAL_SYS_Student_Login(obj_SYS_Role); LoginInfo = dtLogin.Tables[0]; //} if (LoginInfo.Rows.Count > 0 && LoginInfo != null) { AppSessions.AppUserType = "Student"; AppSessions.StudentID = Convert.ToInt32(LoginInfo.Rows[0]["StudentID"].ToString()); AppSessions.UserName = LoginInfo.Rows[0]["FirstName"].ToString(); AppSessions.BMSID = Convert.ToInt32(LoginInfo.Rows[0]["BMSID"].ToString()); AppSessions.BMS = LoginInfo.Rows[0]["BMS"].ToString(); AppSessions.BoardID = Convert.ToInt32(LoginInfo.Rows[0]["BoardID"].ToString()); AppSessions.Board = LoginInfo.Rows[0]["Board"].ToString(); AppSessions.MediumID = Convert.ToInt32(LoginInfo.Rows[0]["MediumID"].ToString()); AppSessions.Medium = LoginInfo.Rows[0]["Medium"].ToString(); AppSessions.StandardID = Convert.ToInt32(LoginInfo.Rows[0]["StandardID"].ToString()); AppSessions.Standard = LoginInfo.Rows[0]["Standard"].ToString(); AppSessions.DivisionID = Convert.ToInt32(LoginInfo.Rows[0]["DivisionID"].ToString()); //AppSessions.Division = LoginInfo.Rows[0]["Division"].ToString(); AppSessions.SchoolID = Convert.ToInt32(LoginInfo.Rows[0]["SchoolID"].ToString()); //AppSessions.SchoolName = LoginInfo.Rows[0]["SchoolName"].ToString(); AppSessions.Role = LoginInfo.Rows[0]["Role"].ToString(); AppSessions.RoleID = Convert.ToInt32(LoginInfo.Rows[0]["RoleID"].ToString()); AppSessions.IsFreePackage = IsFreePackage(); //AppSessions.EmailID = Convert.ToString(LoginInfo.Rows[0]["EmailID"]); //yourLoginMethodStudent(LoginInfo); bool AllowMultipleSession = false; AllowMultipleSession = Convert.ToBoolean(LoginInfo.Rows[0]["AllowMultipleSession"].ToString()); //Hashtable sessions1 = (Hashtable)Application["WEB_SESSIONS_OBJECT"]; //HttpSessionState existingUserSession1 = (HttpSessionState)sessions1[Session["StudentID"].ToString()]; //if (existingUserSession1 != null) //{ // Response.Redirect("../Dashboard/StudentDashboard.aspx"); //} if (AllowMultipleSession == false) { Hashtable sessions = (Hashtable)Application["WEB_SESSIONS_OBJECT"]; if (sessions == null) { sessions = new Hashtable(); } HttpSessionState existingUserSession = (HttpSessionState)sessions[Session["StudentID"].ToString()]; if (existingUserSession != null) { ////existingUserSession[Session["EmpolyeeID"].ToString()] = null; //logout current logged in user WebMsg.Show("you are already logged in."); return; } } ////////getting the pointer to the Session of the current logged in user yourLoginMethodStudent(LoginInfo); //ProceedToRedirectPage(LoginInfo); bool AllowPayment = false; DataSet dsPaymentInfo = new DataSet(); dsPaymentInfo = BLogic_Student.BAL_Select_PaymentPagesInfo("Payment"); if (dsPaymentInfo != null & dsPaymentInfo.Tables.Count > 0) { if (dsPaymentInfo.Tables[0].Rows.Count > 0) { string a = dsPaymentInfo.Tables[0].Rows[0]["value"].ToString(); if (a == "0") { AllowPayment = false; } else { AllowPayment = true; } } } DataSet ds = new DataSet(); StudentDash.StudentID = AppSessions.StudentID; //ds = BLogic_Student.BAL_Validate_Student(StudentDash); ds = BLogic_Student.BAL_Validate_Student_Package(StudentDash); TrackLog_Utils.Log(Convert.ToInt32(AppSessions.SchoolID), Convert.ToInt32(AppSessions.EmployeeOrStudentID), Convert.ToInt16(AppSessions.DivisionID), "Login", "btnLogin", "Click", Convert.ToDateTime(System.DateTime.Now), HttpContext.Current.Session.SessionID, StringEnum.stringValueOf(EnumFile.Activity.LoginSuccess), "LoginId: " + txtEmail.Text, 0); if (AllowPayment == true) { //Session["ShowPaymentPages"] = "yes"; if (ds != null && dtLogin.Tables.Count > 0) { if (ds.Tables[0].Rows.Count > 0) { Session["CheckValidity"] = "Yes"; ProceedToRedirect(); } else { ClientScript.RegisterStartupScript(this.GetType(), "Alert", "alert('We have sent your Login details on your registered Email Address, kindly check your Email to get your Password. ');window.open('../DashBoard/StudentDashboard.aspx','_self');", true); //Response.Redirect("~/DashBoard/StudentDashboard.aspx", false); //ClientScript.RegisterStartupScript(this.GetType(), "Alert", "alert('Congratulation! You got free trial for 30 days. \\n We have sent your Login details on your registered Email Address. ');window.open('../DashBoard/StudentDashboard.aspx','_self');", true); TrackLog_Utils.Log(Convert.ToInt32(AppSessions.SchoolID), Convert.ToInt32(AppSessions.EmployeeOrStudentID), Convert.ToInt16(AppSessions.DivisionID), "Login", "btnLogin", "Click", Convert.ToDateTime(System.DateTime.Now), HttpContext.Current.Session.SessionID, StringEnum.stringValueOf(EnumFile.Activity.PackageSelection), "LoginId: " + txtEmail.Text, 0); } } else { ClientScript.RegisterStartupScript(this.GetType(), "Alert", "alert('We have sent your Login details on your registered Email Address, kindly check your Email to get your Password. ');window.open('../DashBoard/StudentDashboard.aspx','_self');", true); //Response.Redirect("~/DashBoard/StudentDashboard.aspx", false); TrackLog_Utils.Log(Convert.ToInt32(AppSessions.SchoolID), Convert.ToInt32(AppSessions.EmployeeOrStudentID), Convert.ToInt16(AppSessions.DivisionID), "Login", "btnLogin", "Click", Convert.ToDateTime(System.DateTime.Now), HttpContext.Current.Session.SessionID, StringEnum.stringValueOf(EnumFile.Activity.PackageSelection), "LoginId: " + txtEmail.Text, 0); } } else { Session["CheckValidity"] = "Yes"; Session["ShowPaymentPages"] = "No"; ProceedToRedirect(); } } } catch (Exception) { } }