protected void Page_Load(object sender, EventArgs e) { clsSpeedo.Authenticate(); if (!Page.IsPostBack) { string strUsername = Request.Cookies["Speedo"]["UserName"]; if (clsSystemModule.HasAccess("REWARD", Request.Cookies["Speedo"]["UserName"].ToString())) { MakeCart(); LoadDdl(); dtpDateAcquired.MinDate = DateTime.Now; using (clsReward objDetails = new clsReward()) { hdnTransactionCode.Value = Request.QueryString["TransactionCode"].ToString(); objDetails.TransactionCode = Request.QueryString["TransactionCode"].ToInt(); objDetails.Fill(); ddlEvent.SelectedValue = objDetails.RewardCategoryCode.ToString();; txtDescription.Text = objDetails.Description; } LoadTrasactionList(); } else { { Response.Redirect("../AccessDenied.aspx"); } } } }
protected void Page_Load(object sender, EventArgs e) { clsSpeedo.Authenticate(); if (!Page.IsPostBack) { string strUsername = Request.Cookies["Speedo"]["UserName"]; if (clsSystemModule.HasAccess("REWARD", Request.Cookies["Speedo"]["UserName"].ToString())) { if (clsReward.ApproverLevel1 == strUsername) { using (clsReward objDetails = new clsReward()) { string strStatus = ""; objDetails.TransactionCode = Request.QueryString["TransactionCode"].ToInt(); objDetails.Fill(); if (objDetails.Status == "0") { strStatus = "For Approval"; } else if (objDetails.Status == "1") { strStatus = "Approved"; } else if (objDetails.Status == "2") { strStatus = "Disapproved"; } else if (objDetails.Status == "3") { strStatus = "Voided"; } lblEventName.Text = clsRewardCategory.GetName(clsReward.GetRewardCategoryCode(objDetails.TransactionCode.ToString().ToInt()).ToInt()); lblDescription.Text = clsReward.GetDescription(objDetails.TransactionCode); lblCreateBy.Text = objDetails.CreatedBy; lblCreateOn.Text = Convert.ToDateTime(objDetails.CreatedOn).ToString("MMM dd, yyyy"); lblStatus.Text = strStatus; } LoadDetails(); } else { { Response.Redirect("../AccessDenied.aspx"); } } } else { { Response.Redirect("../AccessDenied.aspx"); } } } }