//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); } }
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); } }