Link to home
Start Free TrialLog in
Avatar of mathieu_cupryk
mathieu_cuprykFlag for Canada

asked on

need to create a custom class called Personal.cs. I have done some things. Need someone to check it out.

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


/// <summary>
/// Summary description for Personal
/// </summary>
[Serializable()]
public class Personal
{
    public Personal() { }

    public Personal

        (
         string username,
         string password,
         string email,
         string firstname,
         string lastname,
         DateTime dob,
         int age,
         string gender,
         string seeking,
         string confirmationguid,
         string userid,
         string sessionid)
    {
        this.UserName = username;
        this.Password = password;
        this.Email = email;
        this.FirstName = firstname;
        this.LastName = lastname;
        this.DOB = dob;
        this.Age = age;
        this.Gender = gender;
        this.Seeking = seeking;
        this.ConfirmationGUID = confirmationguid;
        this.UserIP = userip;
        this.SessionID = sessionid;
    }    

    private string username = string.Empty;
    public string UserName
    {
         get { return username;}
         set { username = value;}
    }

    private string password = string.Empty;
    public string Password
    {
        get { return password;}
        set { password = value;}
    }

    private string email = string.Empty;
    public string Email
    {
        get { return email;}
        set { email = value;}
    }

    private string firstname = string.Empty;
    public string FirstName
    {
        get { return FirstName;}
        set { FirstName = value;}
    }

    private string lastname = string.Empty;
    public string LastName
    {
        get { return LastName;}
        set { LastName = value;}
    }

    private DateTime dob = DateTime.Now;
    public DateTime DOB
    {
        get { return DOB;}
        set { DOB = value;}
    }

    private int age = 0;
    public int Age
    {
        get { return Age;}
        set { Age = value;}
    }  

    private string gender = string.Empty;
    public string Gender
    {
        get { return Gender;}
        set { Gender = value;}  
    }

    private string seeking = string.Empty;
    public string Seeking
    {
        get { return Seeking;}
        set { Seeking = value;}
    }

    private string confirmationguid = string.Empty;
    public string ConfirmationGUID
    {
        get { return ConfirmationGUID;}
        set { ConfirmationGUID = value;}
 
    }
 
    private string userip = string.Empty;
    public string UserIP
    {
        get { return UserIP;}
        set { UserIP = value;}
    }

    private string sessionid = string.Empty;
    public string SessionID
    {
        get { return SessionID; }
        set { SessionID = value; }

    }
   
}
ASKER CERTIFIED SOLUTION
Avatar of sunithnair
sunithnair

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mathieu_cupryk

ASKER

also what do I need to assign the dob = ????

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


/// <summary>
/// Summary description for Personal
/// </summary>
[Serializable()]
public class Personal
{
    public Personal() { }

    public Personal

        (
         string username,
         string password,
         string email,
         string firstname,
         string lastname,
         DateTime dob,
         int age,
         string gender,
         string seeking,
         string confirmationguid,
         string userid,
         string sessionid)
    {
        this.UserName = username;
        this.Password = password;
        this.Email = email;
        this.FirstName = firstname;
        this.LastName = lastname;
        this.DOB = dob;
        this.Age = age;
        this.Gender = gender;
        this.Seeking = seeking;
        this.ConfirmationGUID = confirmationguid;
        this.UserIP = userip;
        this.SessionID = sessionid;
    }    

    private string username = string.Empty;
    public string UserName
    {
         get { return username;}
         set { username = value;}
    }

    private string password = string.Empty;
    public string Password
    {
        get { return password;}
        set { password = value;}
    }

    private string email = string.Empty;
    public string Email
    {
        get { return email;}
        set { email = value;}
    }

    private string firstname = string.Empty;
    public string FirstName
    {
        get { return firstname; }
        set { firstname = value; }
    }

    private string lastname = string.Empty;
    public string LastName
    {
        get { return lastname; }
        set { lastname = value; }
    }

    private DateTime dob = DateTime.Now;
    public DateTime DOB
    {
        get { return dob; }
        set { dob = value; }
    }

    private int age = 0;
    public int Age
    {
        get { return age; }
        set { age = value; }
    }  

    private string gender = string.Empty;
    public string Gender
    {
        get { return gender; }
        set { gender = value; }  
    }

    private string seeking = string.Empty;
    public string Seeking
    {
        get { return seeking; }
        set { seeking = value; }
    }

    private string confirmationguid = string.Empty;
    public string ConfirmationGUID
    {
        get { return confirmationguid; }
        set { confirmationguid = value; }
 
    }
 
    private string userip = string.Empty;
    public string UserIP
    {
        get { return userip; }
        set { userip = value; }
    }

    private string sessionid = string.Empty;
    public string SessionID
    {
        get { return sessionid; }
        set { sessionid = value; }

    }
   
}

and i think in 3.5 we can do a get set in less code.
You have to pass a DateTime parameter.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
jacob can u fix this?
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


/// <summary>
/// Summary description for Personal
/// </summary>
[Serializable()]
public class Personal
{
    public Personal() { }

    public Personal

        (
         string username,
         string password,
         string email,
         string firstname,
         string lastname,
         DateTime dob,
         int age,
         string gender,
         string seeking,
         string confirmationguid,
         string userid,
         string sessionid)
    {
        this.UserName = username;
        this.Password = password;
        this.Email = email;
        this.FirstName = firstname;
        this.LastName = lastname;
        this.DOB = dob;
        this.Age = age;
        this.Gender = gender;
        this.Seeking = seeking;
        this.ConfirmationGUID = confirmationguid;
        this.UserIP = userip;
        this.SessionID = sessionid;
    }    

    private string username = string.Empty;
    public string UserName { get; set; }

    private string password = string.Empty;
    public string Password { get; set; }

    private string email = string.Empty;
    public string Email { get; set; }

    private string firstname = string.Empty;
    public string FirstName { get; set; }

    private string lastname = string.Empty;
    public string LastName { get; set; }

    private DateTime dob = DateTime.MinValue;
    public DateTime DOB { get; set; }
 
    private int age = 0;
    public int Age { get; set; }
   
    private string gender = string.Empty;
    public string Gender { get; set; }
   
    private string seeking = string.Empty;
    public string Seeking { get; set; }

    private string confirmationguid = string.Empty;
    public string ConfirmationGUID { get; set; }
   
    private string userip = string.Empty;
    public string UserIP { get; set; }
   
    private string sessionid = string.Empty;
    public string SessionID { get; set; }
   
}

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
 
 
/// <summary>
/// Summary description for Personal
/// </summary>
[Serializable()]
public class Personal
{
    public Personal() { }
 
    public Personal
 
        (
         string username,
         string password,
         string email,
         string firstname,
         string lastname,
         DateTime dob,
         int age,
         string gender,
         string seeking,
         string confirmationguid,
         string userid,
         string sessionid)
    {
        this.UserName = username;
        this.Password = password;
        this.Email = email;
        this.FirstName = firstname;
        this.LastName = lastname;
        this.DOB = dob;
        this.Age = age;
        this.Gender = gender;
        this.Seeking = seeking;
        this.ConfirmationGUID = confirmationguid;
        this.UserIP = userip;
        this.SessionID = sessionid;
    }    
 
    public string UserName { get; set; }
 
    public string Password { get; set; }
 
    public string Email { get; set; }
 
    public string FirstName { get; set; }
 
    public string LastName { get; set; }
 
    public DateTime DOB { get; set; }
 
    public int Age { get; set; }
   
    public string Gender { get; set; }
   
    public string Seeking { get; set; }
 
    public string ConfirmationGUID { get; set; }
   
    public string UserIP { get; set; }
   
    public string SessionID { get; set; }
   
}

Open in new window