コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     intProfile      = Int32.Parse(Request.Cookies["profileid"].Value);
     oServiceRequest = new ServiceRequests(intProfile, dsn);
     oPage           = new Pages(intProfile, dsn);
     oAppPage        = new AppPages(intProfile, dsn);
     oApplication    = new Applications(intProfile, dsn);
     oUser           = new Users(intProfile, dsn);
     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);
     }
     strRedirect   = oPage.GetFullLink(intViewPage);
     lblTitle.Text = oPage.Get(intPage, "title");
     lblPage.Text  = "1";
     lblSort.Text  = "";
     if (Request.QueryString["page"] != null && Request.QueryString["page"] != "")
     {
         lblPage.Text = Request.QueryString["page"];
     }
     if (Request.QueryString["sort"] != null && Request.QueryString["sort"] != "")
     {
         lblSort.Text = Request.QueryString["sort"];
     }
     lblTopPaging.Text = "";
     //try
     //{
     ds = oServiceRequest.GetMine(intProfile);
     LoadPaging(Int32.Parse(lblPage.Text), lblSort.Text);
     //}
     //catch
     //{
     //    LoadPaging(1, "");
     //}
     btnDelete.Attributes.Add("onclick", "return ValidateStringItems('" + hdnDelete.ClientID + "','Please select at least one service request to delete') && confirm('Are you sure you want to delete the selected service request(s)?');");
     btnDelete.Enabled = false;
 }