static void Main(string[] args) { List <Tur> tur = Turs.GetAll_View(); List <Voucher> vav = Vouchers.GetVouchers_Viev(); // LogPas pas = LogPases.GetLogPas("aaaa", 3333); List <Client> list = new List <Client>(); list = Clients.GetClientNotTravel(); // // string resalt = list[1].GetFirstname; // // Console.WriteLine(resalt); // //Clients.GetClientNotTravel(); // //Console.WriteLine("======================================="); // //Clients.GetClientDiscount(); // //Console.WriteLine("======================================="); // Clients.GetClientNotPay(); //int dd = LogPases.CheckLogPas("baby", 1111); //if (dd == 0) // Console.WriteLine("Eto noll"); //else // //List<Client> listCL = new List<Client>(); //listCL = Clients.GetClientNotPay(); //Console.WriteLine(); //List<Payment> listCL = new List<Payment>(); //listCL = Payments.GetAllPays(); List <Tur> listCL = new List <Tur>(); listCL = Turs.GetResult_Search(2, 2); Console.WriteLine(); }
public static List <Client> GetClientNotPay() { List <Voucher> listV = new List <Voucher>(); List <Client> notPay = new List <Client>(); List <Payment> listP = new List <Payment>(); //Console.WriteLine(" Clients did not pay a voucher: "); //Console.WriteLine(" "); listV = Vouchers.GetAllVoucher(); foreach (Voucher dr in listV) { listP = Payments.GetPayment(dr.VoucherID); if (listP.Count == 0) { Client OneClient = GetClientName(Convert.ToInt32(dr.ClientID)); notPay.Add(OneClient); } } return(notPay); }
public static string GetClientDiscount(int clientid) { List <Voucher> vouchCL = new List <Voucher>(); string disc = ""; vouchCL = Vouchers.GetClientVoucher(clientid); if (vouchCL.Count <= 1) { return(" 5% "); } if (vouchCL.Count > 1 && vouchCL.Count <= 3) { return(" 10% "); } if (vouchCL.Count > 3 && vouchCL.Count <= 5) { return(" 20% "); } if (vouchCL.Count > 5) { return(" 30% "); } return(disc); }
public static List <Client> GetClientNotTravel() { List <Client> listCL = new List <Client>(); List <Client> notTrevel = new List <Client>(); List <Voucher> vouchCL = new List <Voucher>(); //Console.WriteLine(" Clients did not traveling: "); //Console.WriteLine(" "); listCL = GetAllClient(); foreach (Client dr in listCL) { DateTime year = DateTime.Now; int data = int.Parse(String.Format("{0: yyyy}", year)); vouchCL = Vouchers.GetVoucherClientYear(dr.ID, data); if (vouchCL.Count == 0) { notTrevel.Add(dr); // Console.WriteLine(dr.GetFirstname +" "+ dr.GetLastname +" ClientID = "+dr.GetID); } } return(notTrevel); }