PageRenderTime 66ms CodeModel.GetById 41ms RepoModel.GetById 0ms app.codeStats 0ms

/BaliEnterpriseSystems/BaliEnterpriseSystems/StudentPersonal.aspx.cs

https://github.com/sirivedula/BEST
C# | 76 lines | 69 code | 7 blank | 0 comment | 6 complexity | 5582daf5c2b3e9fb12c7e10936b069fc 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 StudentPersonal : System.Web.UI.Page
  11. {
  12. BestStudents bstd = new BestStudents();
  13. protected void Page_LoadComplete(object sender, EventArgs e)
  14. {
  15. if (HttpContext.Current.Session["CurrentUser"] == null)
  16. {
  17. Response.Redirect("Logout.aspx");
  18. }
  19. ltrSubMenu.Text = UtilMenu.StudentMenu("studentpersonal");
  20. if (!Utils.User.UserRoleByName("Student - Personal").allowView)
  21. {
  22. ltrPersonalData.Text = "You do not have rights to view.";
  23. return;
  24. }
  25. string ms = Request.QueryString["ms"];
  26. this.ltrMScript.Text = Utils.MenuSelectScript(ms);
  27. if (Utils.User.BestUser.studentGuid != null)
  28. {
  29. BestField fld = new BestField()
  30. {
  31. fieldName = "guidfield",
  32. paramOledbType = System.Data.OleDb.OleDbType.Guid,
  33. fieldType = "System.Guid",
  34. fieldSize = 40
  35. };
  36. fld.fieldValue = Utils.User.BestUser.studentGuid.ToString();
  37. List<BestField> bparam = new List<BestField>();
  38. bparam.Add(fld);
  39. bstd.LoadRows("guidfield=?", bparam);
  40. setdata();
  41. }
  42. }
  43. private void setdata()
  44. {
  45. ltradd1.Text = bstd.address1;
  46. ltradd2.Text = bstd.address2;
  47. ltramount.Text = bstd.Amount;
  48. if (bstd.birthDate > DateTime.MinValue)
  49. ltrbdate.Text = bstd.birthDate.ToShortDateString();
  50. ltrcell.Text = bstd.cellPhone;
  51. ltrcid.Text = bstd.CenterId;
  52. ltrcity.Text = bstd.city;
  53. ltremail.Text = bstd.emailId;
  54. ltrfname.Text = bstd.firstName;
  55. ltrgender.Text = bstd.gender;
  56. ltrgard.Text = bstd.guardianName;
  57. ltrhomep.Text = bstd.homePhone;
  58. ltrhr.Text = bstd.Hours;
  59. ltrhrtype.Text = bstd.hourType;
  60. ltrjoindate.Text = bstd.joinDate.ToShortDateString();
  61. ltrlname.Text = bstd.lastName;
  62. ltrmidname.Text = bstd.middleName;
  63. ltrpname.Text = bstd.parentName;
  64. ltrsid.Text = bstd.StudentId;
  65. ltrwph.Text = bstd.workPhone;
  66. ltrzip.Text = bstd.zip;
  67. }
  68. }
  69. }