Пример #1
0
        public HttpResponseMessage PostNewBombaTicaClient([FromBody] Client value)
        {
            ClientRegister.GetInstance().AddClient(ClientRegister.clientListB, value);
            var response = Request.CreateResponse(HttpStatusCode.Created);

            return(response);
        }
Пример #2
0
        public HttpResponseMessage PostNewPhischelCLient([FromBody] Client value)
        {
            ClientRegister.GetInstance().AddPhischelClient(value);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created);

            response.Headers.Location = new Uri(Request.RequestUri, String.Format("Client/{0}", value.Client_ID));
            return(response);
        }
Пример #3
0
        public IHttpActionResult GetBombaTicaClientById(long id)
        {
            var val = ClientRegister.GetInstance().GetClient(ClientRegister.clientListB, id);

            if (val == null)
            {
                return(NotFound());
            }
            return(Ok(val));
        }
Пример #4
0
        public HttpResponseMessage DeleteBombaTicaClient(long id)
        {
            var val = ClientRegister.GetInstance().RemoveClient(ClientRegister.clientListB, id);

            if (val == false)
            {
                var responseA = Request.CreateResponse(HttpStatusCode.NotModified);
                return(responseA);
            }

            var responseB = Request.CreateResponse(HttpStatusCode.Accepted);

            return(responseB);
        }
Пример #5
0
        public HttpResponseMessage PutPhischelClient(long id, [FromBody] Client value)
        {
            var val = ClientRegister.GetInstance().UpdateClient(ClientRegister.clientListP, id, value);

            if (val == false)
            {
                var responseA = Request.CreateResponse(HttpStatusCode.NotModified);
                return(responseA);
            }

            var responseB = Request.CreateResponse(HttpStatusCode.Accepted);

            return(responseB);
        }
Пример #6
0
 public void DeleteLaBombaClient(int id)
 {
     ClientRegister.GetInstance().RemoveLaBombaClient(id);
 }
Пример #7
0
 public void CheckoutLaBomba(int id)
 {
     ClientRegister.GetInstance().CheckoutLaBomba(ClientRegister.GetInstance().GetPhischelClient(id));
 }
Пример #8
0
 public void RemoveLaBombaClientMedicine(int id, [FromBody] Medicine value)
 {
     ClientRegister.GetInstance().RemoveLaBombaClientMed(ClientRegister.GetInstance().GetPhischelClient(id), value);
 }
Пример #9
0
 public void UpdateLaBombaClientPassword(int id, [FromBody] string value)
 {
     ClientRegister.GetInstance().UpdateLaBombaClientEmail(ClientRegister.GetInstance().GetLaBombaClient(id), value);
 }
Пример #10
0
 public void UpdatePhischelClientPN(int id, [FromBody] int value)
 {
     ClientRegister.GetInstance().UpdatePhischelClientPhone(ClientRegister.GetInstance().GetPhischelClient(id), value);
 }
Пример #11
0
 public Client GetLaBombaClientById(int id)
 {
     return(ClientRegister.GetInstance().GetLaBombaClient(id));
 }
Пример #12
0
 public List <Client> GetAllLaBombaCliensts()
 {
     return(ClientRegister.GetInstance().getAllLaBombaClients());
 }
Пример #13
0
 public void DeletePhischelClient(int id)
 {
     ClientRegister.GetInstance().RemovePhischelCLient(id);
 }
Пример #14
0
 public void AddPhischelClientMedicine(int id, [FromBody] Medicine value)
 {
     ClientRegister.GetInstance().AddPhischelClientMed(ClientRegister.GetInstance().GetPhischelClient(id), value);
 }
Пример #15
0
 public List <Medicine> GetPhischellClientMedListById(int id)
 {
     return(ClientRegister.GetInstance().GetPhichelClientMedicineList(id));
 }
Пример #16
0
 public List <Medicine> GetLaBombaClientMedlistById(int id)
 {
     return(ClientRegister.GetInstance().GetLaBombaClientMedicineList(id));
 }
Пример #17
0
 public Client GetPhischellClientById(int id)
 {
     return(ClientRegister.GetInstance().GetPhischelClient(id));
 }
Пример #18
0
 public void UpdateLaBombaClientAI(int id, [FromBody] string value)
 {
     ClientRegister.GetInstance().UpdateLaBombaClientInfo(ClientRegister.GetInstance().GetLaBombaClient(id), value);
 }
Пример #19
0
 public void UpdatePhischelClientBD(int id, [FromBody] DateTime value)
 {
     ClientRegister.GetInstance().UpdatePhischelClientBirthDate(ClientRegister.GetInstance().GetPhischelClient(id), value);
 }
Пример #20
0
 public List <Client> GetAllPhischelClients()
 {
     return(ClientRegister.GetInstance().getAllPhischelClients());
 }
Пример #21
0
 public void UpdatePhischelClientEmail(int id, [FromBody] string value)
 {
     ClientRegister.GetInstance().UpdatePhischelClientEmail(ClientRegister.GetInstance().GetPhischelClient(id), value);
 }
Пример #22
0
 public List <Client> GetAllBombaTicaClients()
 {
     return(ClientRegister.GetInstance().GetAllClients(ClientRegister.clientListB));
 }