protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         data          = Session["RegForm"] as VisitData;
         lblDescr.Text = String.Format("{0} {1}", data.FirstName, data.LastName);
     } catch (Exception exc)
     {
         Response.Redirect("~/RegisterVisit.aspx");
     }
 }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         VisitData data = Session["RegForm"] as VisitData;
         if (data == null)
         {
             throw new Exception();
         }
     } catch (Exception exc)
     {
         Server.Transfer("~/RegisterVisit.aspx");
     }
 }
 protected void btnOK_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         VisitData data = new VisitData();
         data.FirstName     = tbFName.Text;
         data.LastName      = tbLName.Text;
         data.Email         = tbEmail.Text;
         data.PESEL         = tbPESEL.Text;
         data.CardNumber    = tbVIPNumber.Text;
         data.DateVisit     = calVisitDate.SelectedDate;
         data.DoctorId      = Convert.ToInt32(ddDoctor.SelectedValue);
         Session["RegForm"] = data;
         Response.Redirect("~/RegisterVisit2.aspx");
     }
 }
Exemplo n.º 4
0
        protected void btnOK_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                VisitData data = new VisitData();
                data.FirstName = tbFName.Text;
                data.LastName  = tbLName.Text;
                data.Email     = tbEmail.Text;
                data.Pesel     = tbPesel.Text;
                data.DoctorId  = Convert.ToInt32(ddDoctor.SelectedValue);
                data.DateVisit = calVisitDate.SelectedDate;

                if (cbVip.Checked)
                {
                    data.CardNumber = tbVipNumber.Text;
                }

                Session["RegForm"] = data;
                //Response.Redirect("~/RegisterVisit2");
                Server.Transfer("~/RegisterVisit2");
            }
        }