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(); } }
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); }
public DataSet BAL_Student_GetComplateProfile(StudentDash SD) { DAL_Student_Dashboard = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("StudentID", SD.StudentID)); return(DAL_Student_Dashboard.DAL_Select("proc_Student_GetComplateProfile", arrParameter)); }
public DataSet BAL_Student_ExpiryNotification1(StudentDash StudenDash) { DAL_Student_Dashboard = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("StudentID", StudenDash.StudentID)); return(DAL_Student_Dashboard.DAL_Select("Studentpackagedetails_selectstudentpackage", arrParameter)); }
public DataSet BAL_Student_ExpiryNotification(StudentDash StudenDash) { DAL_Student_Dashboard = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("StudentID", StudenDash.StudentID)); arrParameter.Add(new parameter("mode", StudenDash.Mode)); return(DAL_Student_Dashboard.DAL_Select("Proc_GetNotification_For_PackageExpiry", arrParameter)); }
public DataSet BAL_Validate_Student_Package(StudentDash StudenDash) { DAL_Student_Dashboard = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("StudentID", StudenDash.StudentID)); return(DAL_Student_Dashboard.DAL_Select("studentpackagedetails_select", arrParameter)); // PROC_Fetch_Student_PackageSubjects }
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 = "-"; } }
public DataSet BAL_Student_ExpiredPackageHistory(StudentDash StudenDash) { DAL_Student_Dashboard = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("StudentID", StudenDash.StudentID)); arrParameter.Add(new parameter("PackageID", StudenDash.PackageFDID)); return(DAL_Student_Dashboard.DAL_Select("Studentpackagedetails_selectstudentExpiredpackage", arrParameter)); }
public DataSet BAL_Student_Subject_Select(StudentDash StudenDash) { DAL_Student_Dashboard = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("BMSID", StudenDash.BMSID)); arrParameter.Add(new parameter("PackageFDID", StudenDash.PackageFDID)); arrParameter.Add(new parameter("mode", StudenDash.Mode)); return(DAL_Student_Dashboard.DAL_Select("Proc_Select_Subject_For_StudentDashBoard", arrParameter)); }
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 DataSet BAL_Select_Rescheduling_Data_Student(StudentDash SD) { DAL_Student_Dashboard = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("BMSID", SD.BMSID)); arrParameter.Add(new parameter("SubjectID", SD.SubjectID)); arrParameter.Add(new parameter("StudentID", SD.StudentID)); return(DAL_Student_Dashboard.DAL_Select("Proc_Select_Rescheduling_Data_Student", arrParameter)); }
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); } }
public DataSet BAL_Select_All_Chapters_Topics(StudentDash SD) { DAL_Student_Dashboard = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("BMSID", SD.BMSID)); arrParameter.Add(new parameter("SubjectID", SD.SubjectID)); arrParameter.Add(new parameter("StudentID", SD.StudentID)); return(DAL_Student_Dashboard.DAL_Select("proc_GetChapterTopicStatusByStudent", arrParameter)); }
//public DataSet BAL_Select_Covered_Chapters_Topics(StudentDash SD) //{ // DAL_Student_Dashboard = new DataAccess(); // arrParameter = new ArrayList(); // arrParameter.Add(new parameter("BMSID", SD.BMSID)); // arrParameter.Add(new parameter("SubjectID", SD.SubjectID)); // arrParameter.Add(new parameter("DivisionID", SD.DivisionID)); // arrParameter.Add(new parameter("StudentID", SD.StudentID)); // arrParameter.Add(new parameter("SchoolID", SD.SchoolID)); // return DAL_Student_Dashboard.DAL_Select("PROC_Select_Chapter_Topic_BasedOn_SeqNo_Student", arrParameter); //} public DataSet BAL_Select_Covered_Syllabus(StudentDash SD) { DAL_Student_Dashboard = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("BMSID", SD.BMSID)); arrParameter.Add(new parameter("SubjectID", SD.SubjectID)); arrParameter.Add(new parameter("StudentID", SD.StudentID)); return(DAL_Student_Dashboard.DAL_Select("PROC_Select_Covered_Syllabus_Student", arrParameter)); }
public DataSet BAL_Select_Covered_Chapters_Topics(StudentDash SD) { DAL_Student_Dashboard = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("BMSID", SD.BMSID)); arrParameter.Add(new parameter("SubjectID", SD.SubjectID)); arrParameter.Add(new parameter("StudentID", SD.StudentID)); return(DAL_Student_Dashboard.DAL_Select("PROC_Select_Covered_Chapter_Topic_BasedOn_SeqNo_Student", arrParameter)); }
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 int BAL_Insert_Rescheduling_BMSSCT(StudentDash SD) { DAL_Student_Dashboard = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("BMSID", SD.BMSID)); arrParameter.Add(new parameter("SubjectID", SD.SubjectID)); arrParameter.Add(new parameter("ChapterID", SD.ChapterID)); arrParameter.Add(new parameter("TopicID", SD.TopicID)); arrParameter.Add(new parameter("StudentID", SD.StudentID)); return(DAL_Student_Dashboard.executescalre("Proc_Insert_Rescheduling_BMSSCT_Student", arrParameter)); }
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(); }
public DataSet BAL_Student_PackageHistory(StudentDash StudenDash, string SearchBy, string PackageType, DateTime?Fromdate = null, DateTime?ToDate = null) { DAL_Student_Dashboard = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("StudentID", StudenDash.StudentID)); arrParameter.Add(new parameter("Fromdate", Fromdate)); arrParameter.Add(new parameter("Todate", ToDate)); arrParameter.Add(new parameter("SearchBy", SearchBy)); arrParameter.Add(new parameter("PackageType", PackageType)); //return DAL_Student_Dashboard.DAL_Select("StudentPackageDetails_StudentPackageReport", arrParameter); return(DAL_Student_Dashboard.DAL_Select("StudentPackageDetails_StudentPackageReport_Test", arrParameter)); }
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 = ""; } }
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); } }
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) { } }
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); } }
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); } }
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); } }
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); } }
//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) { } }