// GET: api/LeaveTypes public HttpResponseMessage GetLeaveTypes() { try { var message = Request.CreateErrorResponse(HttpStatusCode.NotFound, "404 : Data Not Found"); var result = iLeaveTypesService.Get(); if (result != null) { message = Request.CreateResponse(HttpStatusCode.OK, result); } return(message); } catch (Exception e) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500 : Internal Server Error")); } }
private void LoadData() { cmb_LeaveType.ItemsSource = iLeaveTypeService.Get(); if (_employee.Role == "1") { Button_Approve.Visibility = Visibility.Collapsed; Button_Reject.Visibility = Visibility.Collapsed; } else if (_employee.Role == "2") { Button_Approve.Visibility = Visibility.Visible; } else if (_employee.Role == "3") { Button_Approve.Visibility = Visibility.Visible; } }
private void LoadCombo() { cmb_LeaveType.ItemsSource = iLeaveTypeService.Get(); }