示例#1
0
        private void PhoneComboBoxList() //Column 3
        {
            PhoneComboBox.Items.Clear();
            var Pho = _phoneService.GetPhone().Where(x => x.PersonModel.Id == Id_Person).Select(x => x.Number);

            foreach (var pho in Pho)
            {
                PhoneComboBox.Items.Add(pho);
            }
        }
示例#2
0
        public IHttpActionResult GetPhone(int id)
        {
            Phone phone = service.GetPhone(id);

            if (phone == null)
            {
                return(NotFound());
            }

            return(Ok(phone));
        }
 public ActionResult GetPhone(int phoneId)
 {
     try
     {
         var phoneDto       = phoneService.GetPhone(phoneId);
         var phoneViewModel = MappingPhoneDtoToPhoneViewModel(phoneDto);
         return(View(phoneViewModel));
     }
     catch (ValidationException ex)
     {
         return(Content(ex.Message));
     }
 }
示例#4
0
 public async Task <Phone> GetPhone(int id)
 {
     return(await phoneService.GetPhone(id));
 }