Exemple #1
0
        public static void Main(string[] args)
        {
            Class_Entity e = new Class_Entity();

            Console.Write("Enter First Name: \t");
            e.First_Name = Console.ReadLine();
            Console.Write("Enter Last Name: \t");
            e.Last_Name = Console.ReadLine();
            Console.Write("Enter Present Address: \t");
            e.Present_Address = Console.ReadLine();
            Console.Write("Enter Permanent Address:\t");
            e.Permanent_Address = Console.ReadLine();
            Console.Write("Enter Password: \t");
            e.Password = Console.ReadLine();
            Console.Write("Enter State:\t");
            e.State = Console.ReadLine();
            Console.Write("Enter Country:\t");
            e.Country = Console.ReadLine();
            Console.Write("Enter Email:\t");
            e.Email_Address = Console.ReadLine();
            Console.Write("Gender: \t");
            e.Gender = Console.ReadLine();
            Console.Write("Marital Status:\t");
            e.Marital_Status = Console.ReadLine();
            Console.Write("Enter Contact Number:\t");
            e.Contact_Number = Console.ReadLine();
            Console.Write("Enter Date of Birth:\t");
            e.Date_of_Birth = DateTime.Parse(Console.ReadLine());
            Console.Write("Enter Identification Proof:\t");
            e.Identification_Proof = Console.ReadLine();

            Class_DAO dao = new Class_DAO();

            dao.dbcon(e);
        }
Exemple #2
0
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            Class_Entity ce = new Class_Entity();

            ce.First_Name           = FName.Text.ToString();
            ce.Last_Name            = LName.Text.ToString();
            ce.Present_Address      = PresentAddress.Text.ToString();
            ce.Permanent_Address    = PermanentAddress.Text.ToString();
            ce.Password             = Password.Text.ToString();
            ce.State                = StateDropDownList.Text.ToString();
            ce.Country              = CountryDropDownList.Text.ToString();
            ce.Email_Address        = Email.Text.ToString();
            ce.Engine               = EngineList.Text.ToString();
            ce.MyBikes              = MyBikes.Text.ToString();
            ce.Contact_Number       = Number.Text.ToString();
            ce.Date_of_Birth        = Convert.ToDateTime(Dob.Text);
            ce.Identification_Proof = IdType.Text.ToString();
            Class_DAO dao = new Class_DAO();

            dao.dbcon(ce);
            Response.Write("<script LANGUAGE='JavaScript' >alert('we will contact you soon for your dreambike.')</script>");
            EmptyTextBoxes(form1);
        }