PageRenderTime 39ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/BaliEnterpriseSystems/BaliEnterpriseSystems/BestStudentPictures.aspx.cs

https://github.com/sirivedula/BEST
C# | 44 lines | 38 code | 6 blank | 0 comment | 3 complexity | a4e82fd3597b1f7afe3794e0c1628abf MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. using BaliEnterpriseSystems.BestObjects;
  8. namespace BaliEnterpriseSystems
  9. {
  10. public partial class BestStudentPictures : System.Web.UI.Page
  11. {
  12. protected void Page_LoadComplete(object sender, EventArgs e)
  13. {
  14. if (HttpContext.Current.Session["CurrentUser"] == null)
  15. {
  16. Response.Redirect("Logout.aspx");
  17. }
  18. ltrSubMenu.Text = UtilMenu.StudentMenu("studentpicture");
  19. if (!Utils.User.UserRoleByName("Student - Pictures").allowView)
  20. {
  21. ltrGrid.Text = "You do not have rights to view.";
  22. return;
  23. }
  24. string ms = Request.QueryString["ms"];
  25. this.ltrMScript.Text = Utils.MenuSelectScript(ms);
  26. BestGrid bsGrid = new BestGrid();
  27. bsGrid.PageRequest = Page.Request;
  28. bsGrid.Title = "Student Pictures";
  29. bsGrid.securityPage = "Student - Pictures";
  30. bsGrid.GridTable = new BestStudentPicture();
  31. bsGrid.allowAdd = false;
  32. bsGrid.allowEdit = false;
  33. bsGrid.allowDelete = false;
  34. bsGrid.extraRowHTML = "<a href=\"UploadPhoto.aspx?cid=[paramCID]&sid=[paramSID]\" target=\"_blank\"><img src=\"images\\user_edit.png\" alt=\"upload\" /></a>";
  35. ltrGrid.Text = bsGrid.ToHTML();
  36. }
  37. }
  38. }