예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     #region Access Control
     HttpCookie cookie = Request.Cookies["CheveuxUserID"];
     if (cookie == null)
     {
         Response.Redirect("../Manager/Service.aspx");
     }
     else if (cookie["UT"] != "M")
     {
         Response.Redirect("../Default.aspx");
     }
     else if (cookie["UT"] == "M")
     {
         //manager is allowed access
     }
     #endregion
     string serviceID = Request.QueryString["ServiceID"];
     service  = handler.BLL_GetServiceFromID(serviceID);
     bservice = handler.BLL_GetBraidServiceFromID(serviceID);
     if (!Page.IsPostBack)
     {
         if (service.ServiceType == 'B')
         {
             divBraidDetails.Visible = true;
             lblStyle.Text           = bservice.StyleDesc;
             lblLength.Text          = bservice.LengthDesc;
             lblWidth.Text           = bservice.WidthDesc;
         }
         lblName.Text = service.ServiceName;
         drpNoOfSlots.SelectedItem.Text = Convert.ToString(service.NoOfSlots);
         txtPrice.Text       = string.Format("{0:#.00}", service.Price).ToString();
         lblDescription.Text = service.Description;
     }
 }