public ActionResult SearchAllOrdenesPagoBySucursal(SCOrdenPago ordenPago) { try { IBCOrdenPago ServiceProvider = new BCOrdenPago(); var searchResult = ServiceProvider.FindOrdenesPagoBySucursal(ordenPago); return(Json(new { Success = true, OrdenesPago = searchResult.OrdenesPago, Total = searchResult.OrdenesPago.Count })); } catch (Exception ex) { return(Json(new { Success = false, Exception = true, Message = ex.Message })); } }
public OrdenPagoModel FindOrdenesPagoBySucursal(SCOrdenPago ordenPago) { DataSet ds = null; try { ds = DAOrdenPago.FindOrdenPagoBySucursal(ordenPago.IdSucursal, ordenPago.IdMoneda); var results = Mapper.Map <IDataReader, List <OrdenPago> >(ds.Tables[Constant.Entity.OrdenPago].CreateDataReader()); return(new OrdenPagoModel() { OrdenesPago = results }); } catch (Exception ex) { throw; } }