protected void Page_Load(object sender, EventArgs e) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oPage = new Pages(intProfile, dsn); oAppPage = new AppPages(intProfile, dsn); oResourceRequest = new ResourceRequest(intProfile, dsn); if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "") { intApplication = Int32.Parse(Request.QueryString["applicationid"]); } if (Request.QueryString["pageid"] != null && Request.QueryString["pageid"] != "") { intPage = Int32.Parse(Request.QueryString["pageid"]); } if (Request.Cookies["application"] != null && Request.Cookies["application"].Value != "") { intApplication = Int32.Parse(Request.Cookies["application"].Value); } DateTime _date = DateTime.Today; lblTitle.Text = "My Upcoming Changes for " + _date.ToLongDateString(); DataSet ds = oResourceRequest.GetChangeControlsUser(intProfile); foreach (DataRow dr in ds.Tables[0].Rows) { if (DateTime.Parse(dr["implementation"].ToString()).ToShortDateString() != _date.ToShortDateString()) { dr.Delete(); } } rptView.DataSource = ds; rptView.DataBind(); lblNone.Visible = (rptView.Items.Count == 0); }
protected void Page_Load(object sender, EventArgs e) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oPage = new Pages(intProfile, dsn); oResourceRequest = new ResourceRequest(intProfile, dsn); oUser = new Users(intProfile, dsn); if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "") { intApplication = Int32.Parse(Request.QueryString["applicationid"]); } if (Request.QueryString["pageid"] != null && Request.QueryString["pageid"] != "") { intPage = Int32.Parse(Request.QueryString["pageid"]); } if (Request.Cookies["application"] != null && Request.Cookies["application"].Value != "") { intApplication = Int32.Parse(Request.Cookies["application"].Value); } lblTitle.Text = oPage.Get(intPage, "title"); DateTime _date = DateTime.Today; if (Request.QueryString["d"] != null) { DateTime.TryParse(Request.QueryString["d"], out _date); } DataSet ds = oResourceRequest.GetChangeControlsUser(intProfile); rptView.DataSource = ds; rptView.DataBind(); lblNone.Visible = (rptView.Items.Count == 0); calThis.VisibleDate = _date; calThis.SelectedDate = _date; ddlYear.SelectedValue = _date.Year.ToString(); ddlMonth.SelectedValue = _date.Month.ToString(); btnToday.ToolTip = DateTime.Today.ToLongDateString(); }