示例#1
0
        public IHttpActionResult getListaAdjudicaciones(PageResultParam model)
        {
            PartnerDataAccess _partnerDataAccess = new PartnerDataAccess();
            PageResultSP <PartnerListaAdjudicacionResponse> result = new PageResultSP <PartnerListaAdjudicacionResponse>();

            result = _partnerDataAccess.getListadoAdjudicacionPartner(model, NroRucEmpresaCurrenUser);
            return(Ok(result));
        }
示例#2
0
        public ActionResult DescargarPartnerLiquidacionExcel(string operaciones)
        {
            PartnerDataAccess _partnerDataAccess = new PartnerDataAccess();
            BaseResponse <List <PartnerListaAdjudicacionResponse> > result = new BaseResponse <List <PartnerListaAdjudicacionResponse> >();

            result = _partnerDataAccess.ListaAdjudicacionExcel(NroRucEmpresaCurrenUser, operaciones);
            if (result.success)
            {
                string       plantilla = System.Configuration.ConfigurationManager.AppSettings["AdjudicacionPartner"];
                XSSFWorkbook hssfworkbook;
                string       path = AppDomain.CurrentDomain.BaseDirectory + plantilla;

                using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read))
                {
                    hssfworkbook = new XSSFWorkbook(file);
                }

                ISheet sheet1 = hssfworkbook.GetSheet("Reporte");
                IRow   row    = sheet1.GetRow(7);
                int    i      = 7;
                //CultureInfo culture;
                //string specifier;
                //specifier = "N3";
                //culture = CultureInfo.CreateSpecificCulture("eu-ES");


                foreach (PartnerListaAdjudicacionResponse item in result.data)
                {
                    row = sheet1.GetRow(i);
                    if (row == null)
                    {
                        row = sheet1.CreateRow(i);
                    }

                    this.SetCellValue(hssfworkbook, row, 1, item.fecha);
                    this.SetCellValue(hssfworkbook, row, 2, item.HoraConfirmacion);
                    this.SetCellValue(hssfworkbook, row, 3, item.idTransaccion);
                    this.SetCellValue(hssfworkbook, row, 4, item.partnersAdjuntado);
                    this.SetCellValue(hssfworkbook, row, 5, item.cliente);
                    this.SetCellValue(hssfworkbook, row, 6, item.quiere);
                    this.SetCellValue(hssfworkbook, row, 7, item.montoUSDventaText);
                    this.SetCellValue(hssfworkbook, row, 8, item.tipoCambioText);
                    this.SetCellValue(hssfworkbook, row, 9, item.montoSolesventaText);
                    this.SetCellValue(hssfworkbook, row, 10, item.estadoSubasta);
                    i++;
                }


                MemoryStream stream = new MemoryStream();
                hssfworkbook.Write(stream);

                return(File(stream.ToArray(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "MisAdjudicaciones.xlsx"));
            }
            else
            {
                return(RedirectToAction("MisAdjudicaciones"));
            }
        }
示例#3
0
        public IHttpActionResult SaveTipoMercadoDiario(List <TipoCambioMercadoPartner_Response> model)
        {
            BaseResponse <string> result = new BaseResponse <string>();

            Domain.DataAccess.Admin.PartnerDataAccess _partnerDataAccess = new PartnerDataAccess();
            result = _partnerDataAccess.guardarTipoCambioMercadoPartner(model, NroRucEmpresaCurrenUser);

            return(Ok(result));
        }
示例#4
0
        public IHttpActionResult getAllSubastasActivas()
        {
            BaseResponse <List <SubastasActivasResponse> > result = new BaseResponse <List <SubastasActivasResponse> >();

            Domain.DataAccess.Admin.PartnerDataAccess _partnerDataAccess = new PartnerDataAccess();
            result = _partnerDataAccess.getSubastasActivas(NroRucEmpresaCurrenUser);

            return(Ok(result));
        }
示例#5
0
        public IHttpActionResult GetTipoCambioMercadoDelDiaXPartner(FiltroBanco_Response banco)
        {
            BaseResponse <List <TipoCambioMercadoPartner_Response> > result = new BaseResponse <List <TipoCambioMercadoPartner_Response> >();

            Domain.DataAccess.Admin.PartnerDataAccess _partnerDataAccess = new PartnerDataAccess();
            result = _partnerDataAccess.getAllTipoCambioMercadoDelDiaPartnert(banco.codBanco);

            return(Ok(result));
        }
示例#6
0
        public IHttpActionResult GetTipoCambioDelDiaXPartner()
        {
            BaseResponse <List <TipoCambioGarantizadoPartner_Response> > result = new BaseResponse <List <TipoCambioGarantizadoPartner_Response> >();

            Domain.DataAccess.Admin.PartnerDataAccess _partnerDataAccess = new PartnerDataAccess();
            result = _partnerDataAccess.getAllTipoCambioGanantizadoDelDiaPartnert(NroRucEmpresaCurrenUser);

            return(Ok(result));
        }
示例#7
0
        public IHttpActionResult updateTipoCambio_SubastaActiva(dynamic param)
        {
            int     subasta_    = param.subasta;
            decimal tipocambio_ = param.tipocambio;

            BaseResponse <string> result             = new BaseResponse <string>();
            PartnerDataAccess     _partnerDataAccess = new PartnerDataAccess();

            _partnerDataAccess.updateTipoCambioSubasta(subasta_, tipocambio_);


            return(Ok(result));
        }