public static Boolean UpdateCustomerAccountData(Commons.CustomerAccountData model) { using (IndexEntities db = new IndexEntities()) { db.spu_CustomerAccountData(model.IdCustomer, model.IdAccount, model.ResolutionRate, model.RegimeRate, model.ResolutionStartDate, model.ResolutionEndDate, model.FiscalPeriodStartDate, model.FiscalPeriodEndDate); } return(true); }
public HttpResponseMessage UpdateCustomerAccountData(Commons.CustomerAccountData model) { HttpResponseMessage respuesta = null; try { Boolean result = Dal.Customer.UpdateCustomerAccountData(model); respuesta = Request.CreateResponse(HttpStatusCode.OK, result); } catch (Exception ex) { respuesta = Request.CreateErrorResponse(HttpStatusCode.Conflict, (ex.InnerException == null) ? ex.Message : ex.InnerException.Message); } return(respuesta); }
public JsonResult ListaItemData(Boolean?IsProduct) { String response = null; ClienteController customerController = new ClienteController(); Commons.Customer customer = customerController.GetCustomer(((Commons.Customer)Session["CUSTOMERINFO"]).Id); Commons.User user = (Commons.User)Session["USERINFO"]; Commons.Account cuenta = (Commons.Account)Session["ACCOUNTINFO"]; Commons.CustomerAccountData cadata = customerController.GetCustomerAccountData(((Commons.Customer)Session["CUSTOMERINFO"]).Id, cuenta.Id).FirstOrDefault(); Functionalities.Reportes.ItemReport data = new Functionalities.Reportes.ItemReport(Server.MapPath("~\\CRfiles\\ListaItem.rpt"), Server.MapPath("~\\ReportFiles\\ListaItem"), user.UserName, customer.EnterpriseName, Url.Content("~\\ReportFiles\\ListaItem")); response = data.Generate(customer.Id, cuenta.Id, IsProduct); return(Json(response, JsonRequestBehavior.AllowGet)); }
public JsonResult ListaExportacionData(DateTime StartDate, DateTime EndDate, Boolean?GetTransmited) { String response = null; ClienteController customerController = new ClienteController(); Commons.Customer customer = customerController.GetCustomer(((Commons.Customer)Session["CUSTOMERINFO"]).Id); Commons.User user = (Commons.User)Session["USERINFO"]; Commons.Account cuenta = (Commons.Account)Session["ACCOUNTINFO"]; Commons.CustomerAccountData cadata = customerController.GetCustomerAccountData(((Commons.Customer)Session["CUSTOMERINFO"]).Id, cuenta.Id).FirstOrDefault(); Functionalities.Reportes.ExportList data = new Functionalities.Reportes.ExportList(Server.MapPath("~\\CRfiles\\ListaExportacion.rpt"), Server.MapPath("~\\ReportFiles\\ListaExportacion"), user.UserName, customer.EnterpriseName, Url.Content("~\\ReportFiles\\ListaExportacion")); response = data.Generate(customer.Id, cuenta.Id, StartDate, EndDate, GetTransmited); return(Json(response, JsonRequestBehavior.AllowGet)); }
public JsonResult DeclaracionJuradaGerencialData(DateTime StartDate, DateTime EndDate, Boolean?GetTransmited, String FileHeaderList, String FileDetailList, Boolean UseFreeze) { String response = null; ClienteController customerController = new ClienteController(); Commons.Customer customer = customerController.GetCustomer(((Commons.Customer)Session["CUSTOMERINFO"]).Id); Commons.User user = (Commons.User)Session["USERINFO"]; Commons.Account cuenta = (Commons.Account)Session["ACCOUNTINFO"]; Commons.CustomerAccountData cadata = customerController.GetCustomerAccountData(((Commons.Customer)Session["CUSTOMERINFO"]).Id, cuenta.Id).FirstOrDefault(); Functionalities.Reportes.SwornDeclarationTwo data = new Functionalities.Reportes.SwornDeclarationTwo(Server.MapPath("~\\CRfiles\\DeclaracionJuradaGerencial.rpt"), Server.MapPath("~\\ReportFiles\\DeclaracionJuradaGerencial"), user.UserName, customer.EnterpriseName, Url.Content("~\\ReportFiles\\DeclaracionJuradaGerencial")); response = data.Generate(customer.Id, cuenta.Id, StartDate, EndDate, null, null, GetImpExpCode(customer), customer.Nit, cadata.ResolutionRate, cadata.ResolutionStartDate, cadata.ResolutionEndDate, GetTransmited, FileHeaderList, FileDetailList, UseFreeze); return(Json(response, JsonRequestBehavior.AllowGet)); }
public JsonResult ListaCongeladosData(DateTime?StartDate, DateTime?EndDate) { String response = null; ClienteController customerController = new ClienteController(); Commons.Customer customer = new ClienteController().GetCustomer(((Commons.Customer)Session["CUSTOMERINFO"]).Id); Commons.User user = (Commons.User)Session["USERINFO"]; Commons.Account cuenta = (Commons.Account)Session["ACCOUNTINFO"]; Commons.CustomerAccountData cadata = customerController.GetCustomerAccountData(((Commons.Customer)Session["CUSTOMERINFO"]).Id, cuenta.Id).FirstOrDefault(); Functionalities.Reportes.FrozenReport data = new Functionalities.Reportes.FrozenReport(Server.MapPath("~\\CRfiles\\ListaCongelados.rpt"), Server.MapPath("~\\ReportFiles\\ListaCongelados"), user.UserName, customer.EnterpriseName, Url.Content("~\\ReportFiles\\ListaCongelados")); response = data.Generate(customer.Id, cuenta.Id, StartDate, EndDate, null, null, GetImpExpCode(customer), customer.Nit, customer.LegalRepresentative, cadata.ResolutionRate, cadata.ResolutionStartDate, cadata.ResolutionEndDate); return(Json(response, JsonRequestBehavior.AllowGet)); }
public ActionResult DescargosFiltroReadDetail([DataSourceRequest] DataSourceRequest request, Int32 IdFileHeader) { ClienteController customerController = new ClienteController(); Commons.Customer customer = customerController.GetCustomer(((Commons.Customer)Session["CUSTOMERINFO"]).Id); Commons.Account cuenta = (Commons.Account)Session["ACCOUNTINFO"]; Commons.CustomerAccountData cadata = customerController.GetCustomerAccountData(((Commons.Customer)Session["CUSTOMERINFO"]).Id, cuenta.Id).FirstOrDefault(); if (customer != null) { IRestResponse WSR = Task.Run(() => apiClient.getJArray("Reporte/Descargo/Detalle", "IdCustomer=" + customer.Id + "&IdAccount=" + cuenta.Id + "&StartDate=" + Session["StarDate"] + "&EndDate=" + Session["EndDate"] + "&GetTransmited=" + Session["GetTransmited"] + "&IdFileHeader=" + IdFileHeader)).Result; if (WSR.StatusCode == HttpStatusCode.OK) { return(new JsonResult() { Data = JArray.Parse(WSR.Content).ToObject <List <FileDetail> >().ToDataSourceResult(request), ContentType = "json", JsonRequestBehavior = JsonRequestBehavior.AllowGet, MaxJsonLength = Int32.MaxValue }); } else { return(Json(new DataSourceResult { Errors = JObject.Parse(WSR.Content).ToObject <Error>().Message.ToString() })); } } else { return(Json(new DataSourceResult { Errors = "No cuenta con clientes asignados" })); } }
public JsonResult JsonDescargosFiltroHeader(DateTime StartDate, DateTime EndDate, Boolean?GetTransmited, String IdDocument) { ClienteController customerController = new ClienteController(); Commons.Customer customer = customerController.GetCustomer(((Commons.Customer)Session["CUSTOMERINFO"]).Id); Commons.Account cuenta = (Commons.Account)Session["ACCOUNTINFO"]; Commons.CustomerAccountData cadata = customerController.GetCustomerAccountData(((Commons.Customer)Session["CUSTOMERINFO"]).Id, cuenta.Id).FirstOrDefault(); if (customer != null) { IRestResponse WSR = Task.Run(() => apiClient.getJArray("Reporte/Descargo/Documento", "IdCustomer=" + customer.Id + "&IdAccount=" + cuenta.Id + "&StartDate=" + StartDate.ToString("yyyy-MM-dd") + "&EndDate=" + EndDate.ToString("yyyy-MM-dd") + "&GetTransmited=" + GetTransmited + "&IdDocument=" + IdDocument)).Result; if (WSR.StatusCode == HttpStatusCode.OK) { return(new JsonResult() { Data = JArray.Parse(WSR.Content).ToObject <List <FileHeader> >(), ContentType = "json", JsonRequestBehavior = JsonRequestBehavior.AllowGet, MaxJsonLength = Int32.MaxValue }); } else { return(Json(new DataSourceResult { Errors = JObject.Parse(WSR.Content).ToObject <Error>().Message.ToString() })); } } else { return(Json(new DataSourceResult { Errors = "No cuenta con clientes asignados" })); } }