コード例 #1
0
ファイル: PeopleMenu.cs プロジェクト: yurakozlovskiy/Post
        public static void Add(ORM orm)
        {
            Console.Write("\nFirstName: ");
            string fn = Console.ReadLine();

            Console.Write("LastName: ");
            string ln = Console.ReadLine();

            Console.Write("Age: ");
            int age = Convert.ToInt32(Console.ReadLine());

            Console.Write("PhoneNumber: ");
            string pn = Console.ReadLine();

            Console.Write("Email: ");
            string em = Console.ReadLine();

            orm.Add(new People
            {
                FirstName   = fn,
                LastName    = ln,
                Age         = age,
                PhoneNumber = pn,
                Email       = em
            });
        }
コード例 #2
0
ファイル: AddressesMenu.cs プロジェクト: yurakozlovskiy/Post
        public static void Add(ORM orm)
        {
            Console.Write("\nCountry: ");
            string country = Console.ReadLine();

            Console.Write("City: ");
            string city = Console.ReadLine();

            Console.Write("Oblast: ");
            string oblast = Console.ReadLine();

            Console.Write("Region: ");
            string region = Console.ReadLine();

            Console.Write("Street: ");
            string street = Console.ReadLine();

            Console.WriteLine("House: ");
            int house = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Flat: ");
            int flat = Convert.ToInt32(Console.ReadLine());

            orm.Add(new Addresses
            {
                Country = country,
                City    = city,
                Oblast  = oblast,
                Region  = region,
                Street  = street,
                House   = house,
                Flat    = flat
            });
        }
コード例 #3
0
        public static void Add(ORM orm)
        {
            Console.Write("\nName: ");
            string name = Console.ReadLine();

            orm.Add(new Types
            {
                Name = name
            });
        }
コード例 #4
0
        public static void Add(ORM orm)
        {
            Console.Write("\nStatus: ");
            string status = Console.ReadLine();

            orm.Add(new DeliveryStatus
            {
                Status = status
            });
        }
コード例 #5
0
ファイル: CarsMenu.cs プロジェクト: yurakozlovskiy/Post
        public static void Add(ORM orm)
        {
            Console.Write("\nBrand: ");
            string br = Console.ReadLine();

            Console.Write("Number: ");
            string n = Console.ReadLine();

            Console.Write("Year: ");
            DateTime year = Convert.ToDateTime(Console.ReadLine());


            orm.Add(new Cars
            {
                Brand  = br,
                Number = n,
                Year   = year
            });
        }
コード例 #6
0
 //添加用户
 public static void Add(Model.User user)
 {
     ORM.Add(user, new Model.UserMapping(), Constant.CONNSTRING);
 }