コード例 #1
0
        public void ClientLists()
        {
            DAOClient doc = new DAOClient();

            List <Client> ClientList = new List <Client>();

            ClientList = doc.ClientList();

            foreach (Client client in ClientList)
            {
                BLClient bldCt = new BLClient(client.ClientEmail, client.ClientName, client.ClientPassword, client.ClientAvailable);
                ClientListBL.Add(bldCt);
            }
        }
コード例 #2
0
        public List <BLClient> ChargeClientLists()
        {
            DAOClient doc = new DAOClient();

            List <Client>   ClientList = new List <Client>();
            List <BLClient> ListC      = new List <BLClient>();

            ClientList = doc.ClientList();

            foreach (Client client in ClientList)
            {
                BLClient bldCt = new BLClient(client.ClientEmail, client.ClientName, client.ClientPassword, client.ClientAvailable);
                ListC.Add(bldCt);
            }

            return(ListC);
        }
コード例 #3
0
        public string UpdateClient(BLClient client)
        {
            string update = "No se pudo realizar la actualización";

            ClientLists();
            DAOClient dc = new DAOClient();

            foreach (BLClient blc in ClientListBL)
            {
                if (blc.ClientEmail == client.ClientEmail)
                {
                    Client cl = new Client();
                    cl.ClientName      = client.ClientName;
                    cl.ClientPassword  = client.ClientPassword;
                    cl.ClientAvailable = client.ClientAvailable;
                    dc.updateClient(cl);
                    update = "Actualización exitosa de cliente";
                    return(update);
                }
            }
            return(update);
        }
コード例 #4
0
        public BLClient GetUserLoginValidation(string email, string password)
        {
            DAOClient da   = new DAOClient();
            BLClient  clBL = new BLClient();
            Client    cl   = new Client();

            cl.ClientEmail    = email;
            cl.ClientPassword = password;

            Client clFound = da.UserLoginValidation(cl);

            if (clFound == null)
            {
                return(null);
            }
            else
            {
                clBL.ClientEmail    = clFound.ClientEmail;
                clBL.ClientPassword = clFound.ClientPassword;

                return(clBL);
            }
        }