예제 #1
0
 static void Main(string[] args)
 {
     ClassLibrary.Person person = new ClassLibrary.Person(0, "Бенджамин", "Франклин", 84);
     Console.WriteLine(ClassLibrary.StaticClass.StaticMetod(person));
     Console.ReadLine();
     Console.WriteLine(ConstClass.STR + ConstClass.VARIABLE);
     Console.ReadLine();
 }
예제 #2
0
        public static Person GetInfo(out Person p)
        {
            Person res = new ClassLibrary.Person();

            res.Name    = "Kaldr";
            res.Surname = "Merg";
            res.Age     = 23;
            p           = res;
            return(p);
        }
예제 #3
0
        static void Main(string[] args)
        {
            ClassLibrary.Person person = new ClassLibrary.Person();
            ClassLibrary.StaticMethodClass.ShowPerson(person);

            Constant constant = new Constant();

            Console.WriteLine(constant.Name);
            Console.WriteLine(constant.Age);
            Console.WriteLine(constant.Height);
            Console.ReadKey();
        }
 public IActionResult Thanks(ClassLibrary.Delivery delivery, ClassLibrary.Person person, ClassLibrary.CardInfo card)
 {
     if (val.ValidateName(person.FirstName) && val.ValidateName(person.LastName) && val.ValidateAdress(person.Adress) &&
         val.ValidateZip(person.ZipCode) && val.ValidateCity(person.City) && val.ValidateEmail(person.Email) &&
         val.ValidateDes(delivery.CommentOnDelivery)
         )
     {
         db.CustumerOrder(new ClassLibrary.Order {
             delivery = delivery, person = person, cart = Cart.cartList
         });
         Cart.cartList.Clear();
         Cart.Total = 0;
         return(View());
     }
     else
     {
         return(View());
     }
 }