Ejemplo n.º 1
0
        protected void btnSubmit_Command(object sender, CommandEventArgs e)
        {
            User user = null;
            Person person = null;

            user = new User()
            {
                Username = this.txtUsername.Text.Trim(),
                Password = this.txtPassword1.Text
            };

            person = new Person()
            {
                Gender = (short)(this.rbnGender.SelectedValue == "female" ? Gender.Female : Gender.Male),
                GivenName = this.txtGivenName.Text,
                LastName = this.txtLastName.Text,
                Nationality = this.ddlNationality.SelectedValue,
                Language = this.ddlLanguage.SelectedValue,
                Birthday = DateTime.Parse(this.txtBirthday.Text),
                Phone = this.txtPhone.Text,
                EMail = this.txtEMail.Text,
                Permit = this.ddlPermit.SelectedValue,
                Co = this.txtCo.Text,
                Street = this.txtStreet.Text,
                StreetNo = this.txtStreetNo.Text,
                ZIP = this.txtZip.Text,
                City = this.txtCity.Text
            };

            Session["user"] = user;
            Session["person"] = person;

            Response.Redirect("register2.aspx", true);
        }
Ejemplo n.º 2
0
        protected void loadData()
        {
            m_person = UserHelper.GetPerson(m_user);
            m_details = UserHelper.GetInsuranceDetails(m_person);

            if (!IsPostBack)
            {
                this.txtCo.Text = m_person.Co;
                this.txtStreet.Text = m_person.Street;
                this.txtStreetNo.Text = m_person.StreetNo;
                this.txtZip.Text = m_person.ZIP;
                this.txtCity.Text = m_person.City;

                this.txtEnd.Text = ((DateTime)m_details.EndDate).ToShortDateString();
                this.txtBegin.Text = ((DateTime)m_details.StartDate).ToShortDateString();

                // this.txtCancelDate.Text = ((DateTime)m_details.EndDate).ToShortDateString();

                this.lblFranchise.Text = string.Format("CHF {0:0.00} ", m_details.Franchise);

                //this.txtBegin2.Text = DateTime.Now.ToShortDateString();
                //this.txtEnd2.Text = ((DateTime)m_details.EndDate).ToShortDateString();
                //this.lblPraemie.Text = string.Format("CHF {0:0.00} ", PraemienHelper.GetPraemieOhneMitgliederbeitrag((int)m_details.Franchise));
                //this.lblErstePraemie.Text = string.Format("CHF {0:0.00} ", PraemienHelper.GetErstePraemie((int)m_details.Franchise, (DateTime)m_details.StartDate));

                this.lblLetzteBelastung.Text = InsuranceHelper.GetLetzteBelastung(m_person).ToShortDateString();
            }
        }
 partial void DeletePerson(Person instance);
 partial void UpdatePerson(Person instance);
 partial void InsertPerson(Person instance);