Beispiel #1
0
        private AdministrationEDSC.UserProfilesDTRow GetRegistrationData()
        {
            AdministrationEDSC.UserProfilesDTRow dr = new AdministrationEDSC.UserProfilesDTDataTable().NewUserProfilesDTRow();

            dr.ID        = Convert.ToInt32(hdnID.Value);
            dr.UserID    = UserID;
            dr.Username  = hdnUsername.Value;
            dr.Title     = Convert.ToInt32(ddlTitle.SelectedValue);
            dr.FirstName = txtFirstName.Text;
            if (txtMiddleName.Text == "Middle Name (Optional)")
            {
                dr.MiddleName = "";
            }
            else
            {
                dr.MiddleName = txtMiddleName.Text;
            }
            dr.LastName         = txtLastName.Text;
            dr.Email            = hdnEmailAddress.Value;
            dr.Address          = txtAddress1.Text;
            dr.Suburb           = txtSuburb.Text;
            dr.StateID          = Convert.ToInt32(ddlState.SelectedValue);
            dr.PhoneNumber      = txtContactNumber.Text;
            dr.MobileNumber     = txtMobileNumber.Text;
            dr.Aggreement       = Convert.ToBoolean(hdnAgreement.Value);
            dr.DOB              = Convert.ToDateTime(txtDOB.Text);
            dr.PostCode         = Convert.ToInt32(txtPostCode.Text);
            dr.CreatedBy        = hdnCreatedBy.Value;
            dr.CreatedDatetime  = Convert.ToDateTime(hdnCreatedDatetime.Value);
            dr.ModifiedBy       = WebSecurity.CurrentUserName;
            dr.ModifiedDatetime = DateTime.Now;

            if (radiobyEMail.Checked)
            {
                dr.PreferredContact = 1;
            }
            else if (radiobyMail.Checked)
            {
                dr.PreferredContact = 3;
            }
            else if (radiobyPhone.Checked)
            {
                dr.PreferredContact = 2;
            }

            if (radFemale.Checked)
            {
                dr.Gender = (int)SystemConstants.Gender.Female;
            }
            else if (radMale.Checked)
            {
                dr.Gender = (int)SystemConstants.Gender.Male;
            }
            return(dr);
        }
Beispiel #2
0
        private AdministrationEDSC.UserProfilesDTDataTable GetSelected()
        {
            var dt = new AdministrationEDSC.UserProfilesDTDataTable();

            foreach (GridViewRow row in gridview1.Rows)
            {
                CheckBox chkSelected = row.FindControl("chkSelected") as CheckBox;


                if (chkSelected.Checked)
                {
                    Label      lblEmail    = row.FindControl("lblEmail") as Label;
                    LinkButton lblUsername = row.FindControl("lnkUserName") as LinkButton;
                    var        dr          = dt.NewUserProfilesDTRow();
                    dr.Username = lblUsername.Text;
                    dr.UserID   = Guid.Empty;
                    dt.AddUserProfilesDTRow(dr);
                }
            }
            return(dt);
        }