GetDannBranchResponse IDannCarltonService.GetDannBranch(GetDannBranchRequest prmgetDannBranchRequest) { GetDannBranchResponse getDannBranchResponse = new GetDannBranchResponse(); getDannBranchResponse.Status = new Status(); try { IDannCarltonServiceBusiness iDannCarlonSBusiness; iDannCarlonSBusiness = new DannCarltonServiceBusiness(); getDannBranchResponse = iDannCarlonSBusiness.GetDannBranch(prmgetDannBranchRequest); } catch (Exception ex) { getDannBranchResponse.Status.ErrorCode = "01"; getDannBranchResponse.Status.ErrorDescription = "Error en el Servicio"; Common.CreateTrace.WriteLog(Common.CreateTrace.LogLevel.Error, "ERROR EN EL SERVICIO DannCarltonService: GetDannBranch" + ex.Message); throw ex; } return(getDannBranchResponse); }
public GetDannBranchResponse1(GetDannBranchResponse GetDannBranchResponse) { this.GetDannBranchResponse = GetDannBranchResponse; }
GetDannBranchResponse IDannCarltonServiceBusiness.GetDannBranch(GetDannBranchRequest prmgetDannBranchRequest) { GetDannBranchResponse getDannBranchResponse = new GetDannBranchResponse(); getDannBranchResponse.Status = new Status(); List <GetDannBranchResult> lstgetDannBranchResults = new List <GetDannBranchResult>(); try { ReservationsDTO reservationsDTO = new ReservationsDTO(); if (prmgetDannBranchRequest != null) { ReservationsDAL reservationsDAL = new ReservationsDAL(); List <ReservationsDTO> lstreservationsDTOs; lstreservationsDTOs = reservationsDAL.GetDannBranch(reservationsDTO); if (lstreservationsDTOs != null) { getDannBranchResponse.Status.ErrorDescription = "0"; if (lstreservationsDTOs.Count > 0) { foreach (ReservationsDTO FEreservationsDTO in lstreservationsDTOs) { GetDannBranchResult getDannBranchResult; getDannBranchResult = new GetDannBranchResult { BranchName = FEreservationsDTO.BranchName, Id = FEreservationsDTO.ID, Address = FEreservationsDTO.Address, BranchCode = FEreservationsDTO.BranchCode, CiiuCode = FEreservationsDTO.CiiuCode, City = FEreservationsDTO.City, Phone = FEreservationsDTO.Phone, Stars = FEreservationsDTO.Stars }; lstgetDannBranchResults.Add(getDannBranchResult); } getDannBranchResponse.Status.ErrorCode = "0"; getDannBranchResponse.Status.ErrorDescription = "Proceso Satisfactorio"; getDannBranchResponse.GetDannBranchResult = lstgetDannBranchResults.ToArray(); } else { getDannBranchResponse.Status.ErrorDescription = "No hay Branch con los parametros ingresados"; } } else { getDannBranchResponse.Status.ErrorCode = "01"; getDannBranchResponse.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; getDannBranchResponse.Status.ErrorCode = "01"; getDannBranchResponse.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:GetDannBranch"); Common.CreateTrace.WriteLog(Common.CreateTrace.LogLevel.Error, " :: " + le_e.Message); throw le_e; } return(getDannBranchResponse); }