public GetRoomsByBranchResponse GetRoomsByBranch(GetRoomsByBranchRequest GetRoomsByBranchRequest) { GetRoomsByBranchRequest1 inValue = new GetRoomsByBranchRequest1(); inValue.GetRoomsByBranchRequest = GetRoomsByBranchRequest; GetRoomsByBranchResponse1 retVal = ((DannCarltonService)(this)).GetRoomsByBranch(inValue); return(retVal.GetRoomsByBranchResponse); }
GetRoomsByBranchResponse IDannCarltonService.GetRoomsByBranch(GetRoomsByBranchRequest prmgetRoomsByBranch) { GetRoomsByBranchResponse getRoomsByBranchResponse = new GetRoomsByBranchResponse(); getRoomsByBranchResponse.Status = new Status(); try { IDannCarltonServiceBusiness iDannCarlonSBusiness; iDannCarlonSBusiness = new DannCarltonServiceBusiness(); getRoomsByBranchResponse = iDannCarlonSBusiness.GetRoomsByBranch(prmgetRoomsByBranch); } catch (Exception ex) { getRoomsByBranchResponse.Status.ErrorCode = "01"; getRoomsByBranchResponse.Status.ErrorDescription = "Error en el Servicio"; Common.CreateTrace.WriteLog(Common.CreateTrace.LogLevel.Error, "ERROR EN EL SERVICIO DannCarltonService: GetRoomsByBranch" + ex.Message); throw ex; } return(getRoomsByBranchResponse); }
public GetRoomsByBranchRequest1(GetRoomsByBranchRequest GetRoomsByBranchRequest) { this.GetRoomsByBranchRequest = GetRoomsByBranchRequest; }
public System.Threading.Tasks.Task <GetRoomsByBranchResponse1> GetRoomsByBranchAsync(GetRoomsByBranchRequest GetRoomsByBranchRequest) { GetRoomsByBranchRequest1 inValue = new GetRoomsByBranchRequest1(); inValue.GetRoomsByBranchRequest = GetRoomsByBranchRequest; return(((DannCarltonService)(this)).GetRoomsByBranchAsync(inValue)); }
GetRoomsByBranchResponse IDannCarltonServiceBusiness.GetRoomsByBranch(GetRoomsByBranchRequest prmgetRoomsByBranchRequest) { GetRoomsByBranchResponse getRoomsByBranchResponse = new GetRoomsByBranchResponse(); getRoomsByBranchResponse.Status = new Status(); List <GetRoomsByBranchResult> lstgetRoomsByBranchResults = new List <GetRoomsByBranchResult>(); try { ReservationsDTO reservationsDTO = new ReservationsDTO(); if (prmgetRoomsByBranchRequest != null) { if (prmgetRoomsByBranchRequest.BranchCode != null && prmgetRoomsByBranchRequest.BranchCode.Trim().Length > 0) { reservationsDTO.BranchCode = prmgetRoomsByBranchRequest.BranchCode; } else { throw new Exception("Branch Code Obligatorio"); } ReservationsDAL reservationsDAL = new ReservationsDAL(); List <ReservationsDTO> lstreservationsDTOs; lstreservationsDTOs = reservationsDAL.GetRoomsByBranch(reservationsDTO); if (lstreservationsDTOs != null) { getRoomsByBranchResponse.Status.ErrorDescription = "0"; if (lstreservationsDTOs.Count > 0) { foreach (ReservationsDTO FEreservationsDTO in lstreservationsDTOs) { GetRoomsByBranchResult getRoomsByBranchResult; getRoomsByBranchResult = new GetRoomsByBranchResult { Beds = FEreservationsDTO.Beds, Id = FEreservationsDTO.ID, BranchId = FEreservationsDTO.BranchId, Description = FEreservationsDTO.Description, Discount = FEreservationsDTO.Discount, Number = FEreservationsDTO.Number, Price = FEreservationsDTO.Price, RoomName = FEreservationsDTO.RoomName, Vat = FEreservationsDTO.Vat }; lstgetRoomsByBranchResults.Add(getRoomsByBranchResult); } getRoomsByBranchResponse.Status.ErrorCode = "0"; getRoomsByBranchResponse.Status.ErrorDescription = "Proceso Satisfactorio"; getRoomsByBranchResponse.GetRoomsByBranchResult = lstgetRoomsByBranchResults.ToArray(); } else { getRoomsByBranchResponse.Status.ErrorDescription = "No hay Rooms por el Branch ingresado"; } } else { getRoomsByBranchResponse.Status.ErrorCode = "01"; getRoomsByBranchResponse.Status.ErrorDescription = "Error en la ejecución del servicio"; } } else { throw new Exception("Parametros de entrada vacios"); } } catch (Exception exc) { Exception le_e; le_e = exc.InnerException != null ? exc.InnerException : exc; getRoomsByBranchResponse.Status.ErrorCode = "01"; getRoomsByBranchResponse.Status.ErrorDescription = exc.InnerException != null ? "Error en la ejecucion del servicio" : exc.Message; Common.CreateTrace.WriteLog(Common.CreateTrace.LogLevel.Error, "ERROR EN LA CAPA DE NEGOCIO DannCarltonService:GetRoomsByBranch"); Common.CreateTrace.WriteLog(Common.CreateTrace.LogLevel.Error, " :: " + le_e.Message); throw le_e; } return(getRoomsByBranchResponse); }