Exemple #1
0
 public string AddSeatindb(AddSeats obj)
 {
     using (HttpClient client = new HttpClient())
     {
         string stringData            = JsonConvert.SerializeObject(obj);
         var    contentData           = new StringContent(stringData, System.Text.Encoding.UTF8, "application/json");
         HttpResponseMessage response = client.PostAsync(webapiurl + "/Admin/Updateseat", contentData).Result;
         var list = response.Content.ReadAsStringAsync().Result;
         return(list);
     }
 }
Exemple #2
0
        // Commands created from events from the conference BC

        public void Handle(AddSeats command)
        {
            var availability = repository.Find(command.ConferenceId);

            if (availability == null)
            {
                availability = new SeatsAvailability(command.ConferenceId);
            }

            availability.AddSeats(command.SeatType, command.Quantity);
            repository.Save(availability, command.Id.ToString());
        }
Exemple #3
0
        public ActionResult AddSeats(AddSeats obj)
        {
            var res = AddSeatMethod(obj);

            if (res.Contains("Successfully"))
            {
                ViewBag.Message = res;
                ViewBag.Screen  = DropDown.ScreenList();
                ViewBag.Class   = DropDown.Classid();
            }
            return(View("AdminUserPage"));
        }
Exemple #4
0
        public HttpResponseMessage Updateseat(AddSeats obj)
        {
            bool status = false;

            status = objReg.updateSeat(obj);
            if (status == true)
            {
                var showmessage = "Updated Successfully.";

                return(Request.CreateResponse(HttpStatusCode.OK, showmessage));
            }
            else
            {
                var showmessage = "Fail Please try again.";

                return(Request.CreateResponse(HttpStatusCode.BadRequest, showmessage));
            }
        }
Exemple #5
0
 public string AddSeatMethod(AddSeats obj)
 {
     return(HttpCalls.Httpclientcall(obj, "Admin", "Updateseat"));
 }