public void CargarDatos() { //datos var db = new Entities(); var config = ConfiguracionModel.GetConfig(); var cat = Categoria.Value.ToString(); var data = from i in db.IngresoFinanzas where i.fecha.Month == config.MesActual && i.fecha.Year == config.AnoActual group i by i.Cuentas.TipoMoneda into cuentaGroup select new { moneda = cuentaGroup.Key, importe = cuentaGroup.Sum(c => c.importe) }; DataSource = data.ToList(); this.monedaCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "moneda") }); this.importeCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "importe") }); }
// // GET: /SalidaAlmacen/ public ActionResult Index() { var config = ConfiguracionModel.GetConfig(); var salidaalmacen = db.SalidaAlmacen.Include(s => s.Almacen).Include(s => s.TipoAyuda).Include(s => s.Usuario).Where(i => i.fecha.Month == config.MesActual && i.fecha.Year == config.AnoActual); return(View(salidaalmacen.ToList())); }
// // GET: /Config/ public ActionResult Index() { try { var model = ConfiguracionModel.GetConfig(); //if (db.Cuentas.Any(c => c.TipoMoneda.siglas.ToUpper() == "CUC") || db.Cuentas.Any(c => c.TipoMoneda.siglas.ToUpper() == "MN")) //{ // return RedirectToAction("Create", "Cuenta"); //} var meses = new List <dynamic> { new { mes = "Enero", id = 1 }, new { mes = "Febrero", id = 2 } , new { mes = "Marzo", id = 3 }, new { mes = "Abril", id = 4 } , new { mes = "Mayo", id = 5 }, new { mes = "Junio", id = 6 } , new { mes = "Julio", id = 7 }, new { mes = "Agosto", id = 8 } , new { mes = "Septiembre", id = 9 }, new { mes = "Octubre", id = 10 } , new { mes = "Noviembre", id = 11 }, new { mes = "Diciembre", id = 12 } }; ViewBag.MesActual = new SelectList(meses, "id", "mes", model.MesActual); return(View(model)); } catch (Exception) { throw new Exception("No se encontro el fichero de configuracion"); } }
public ActionResult Cerrar() { var config = ConfiguracionModel.GetConfig(); config.CambiarMes(); return(RedirectToAction("Index", "Home")); }
public ActionResult Index(ConfiguracionModel configuracion) { //var ing = db.IngresoFinanzas.FirstOrDefault(i => i.fecha.Month == configuracion.MesActual && i.fecha.Year == configuracion.AnoActual); //var gast = db.GastoFinanzas.FirstOrDefault(i => i.fecha.Month == configuracion.MesActual && i.fecha.Year == configuracion.AnoActual); //if (ing != null || gast != null) //{ // ModelState.AddModelError("","Ya este mes esta en proceso o se cerro, no se puede seleccionar"); //} if (ModelState.IsValid) { configuracion.SaveConfig(); return(RedirectToAction("Index", "Home")); } var meses = new List <dynamic> { new { mes = "Enero", id = 1 }, new { mes = "Febrero", id = 2 } , new { mes = "Marzo", id = 3 }, new { mes = "Abril", id = 4 } , new { mes = "Mayo", id = 5 }, new { mes = "Junio", id = 6 } , new { mes = "Julio", id = 7 }, new { mes = "Agosto", id = 8 } , new { mes = "Septiembre", id = 9 }, new { mes = "Octubre", id = 10 } , new { mes = "Noviembre", id = 11 }, new { mes = "Diciembre", id = 12 } }; ViewBag.MesActual = new SelectList(meses, "id", "mes", configuracion.MesActual); return(View(configuracion)); }
// // GET: /CompraProducto/ public ActionResult Index() { var config = ConfiguracionModel.GetConfig(); var compraproducto = db.CompraProducto.Include(c => c.Producto).Include(c => c.Usuario).Include(c => c.Cuentas).Where(i => i.fecha.Month == config.MesActual && i.fecha.Year == config.AnoActual); return(View(compraproducto.ToList())); }
public ActionResult ConfiguracionHHT() { var usuarioActual = ObtenerUsuarioEnSesion(System.Web.HttpContext.Current); if (usuarioActual == null) { ViewBag.Mensaje = "Debe estar autenticado para visualizar los Indicadores."; return(View()); } var objConfiguracion = new ConfiguracionModel(); objConfiguracion.RazonSocial = usuarioActual.RazonSocialEmpresa; var usuario = ObtenerUsuarioEnSesion(System.Web.HttpContext.Current); //se quema el id de la empresa en "1" si no hay session. !!!!Corregir cuando se tenga Autenticacion!!!! objConfiguracion.IdEmpresaSeleccionada = usuario == null ? "1" : usuario.NitEmpresa; objConfiguracion.Meses = objConfiguracion.ConfigurarMeses(); ServiceClient.EliminarParametros(); ServiceClient.AdicionarParametro("NIT", usuarioActual.NitEmpresa); var resultAno = ServiceClient.ObtenerObjetoJsonRestFul <int>(UrlServicioPlanificacion, CapacidadObtenerAnoInicioEmpresa, RestSharp.Method.GET); if (resultAno > 0) { objConfiguracion.Anos = GetAnios(resultAno); } else { objConfiguracion.Anos = GetAnios(2010); } return(View(objConfiguracion)); }
// // GET: /GastoFinanza/ public ActionResult Index() { var config = ConfiguracionModel.GetConfig(); var gastofinanzas = db.GastoFinanzas.Include(g => g.ConceptoGasto).Include(g => g.Cuentas).Include(g => g.Usuario).Include(g => g.SubconceptoGasto).Where(g => g.fecha.Month == config.MesActual && g.fecha.Year == config.AnoActual); return(View(gastofinanzas.ToList())); }
// // GET: /IngresoFinanza/ public ActionResult Index() { var config = ConfiguracionModel.GetConfig(); var ingresofinanzas = db.IngresoFinanzas.Where(i => i.Cuentas.activo).Include(i => i.ConceptoIngreso).Include(i => i.Cuentas).Include(i => i.Usuario).Include(i => i.Persona).Where(i => i.fecha.Month == config.MesActual && i.fecha.Year == config.AnoActual); return(View(ingresofinanzas.ToList())); }
public Cumpleanos() { InitializeComponent(); // Info de los parametros var config = ConfiguracionModel.GetConfig(); this.mesLabel.Text = config.MesActual.ToString(); this.yearLabel.Text = config.AnoActual.ToString(); this.fechaLabel.Text = DateTime.Now.Date.ToShortDateString(); //fin Info de los parametros var db = new Entities(); var fechaInicio = Semana(); var fechaFin = fechaInicio.Add(new TimeSpan(6, 0, 0, 0, 0)); var data = from i in db.Persona where i.activo && i.fechaNacimiento.Month >= fechaInicio.Month && i.fechaNacimiento.Month <= fechaFin.Month && i.fechaNacimiento.Day >= fechaInicio.Day && i.fechaNacimiento.Day <= fechaFin.Day select new { persona = i, fecha = i.fechaNacimiento, edad = DateTime.Today.Year - i.fechaNacimiento.Year, categoria = i.CategoriaPersona, miembro = i.miembro?"SI":"NO" }; var result = new List <dynamic>(); foreach (var d in data) { result.Add(new { d.persona, fecha = Dia(d.fecha.AddYears(d.edad).DayOfWeek) + " " + d.fecha.Day, d.edad, d.categoria, d.miembro }); } DataSource = result; this.nombreCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "persona") }); this.fechaNacCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "fecha") }); this.edadCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "edad") }); this.categoriaCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "categoria") }); this.miembroCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "miembro") }); fechaInicioLabel.Text = fechaInicio.ToShortDateString(); fechaFinLabel.Text = fechaFin.ToShortDateString(); }
public void CargarDatos() { //datos var db = new Entities(); var config = ConfiguracionModel.GetConfig(); var fechaIni = (DateTime)FechaInicio.Value; var fechaFin = (DateTime)FechaFin.Value; var result = new List <dynamic>(); var lista = ListaConceptos.Value.ToString().Split(','); foreach (var s in lista) { if (s != "") { var id = int.Parse(s); var data = from i in db.IngresoFinanzas where i.fecha >= fechaIni && i.fecha <= fechaFin && i.ConceptoIngresoid == id orderby i.fecha, i.ConceptoIngresoid select new { i.fecha, i.importe, cuenta = i.Cuentas, i.ConceptoIngreso.concepto, descripcion = i.descripcion == null ? " Tramitado por: " + i.Usuario.nombreUsuario : i.descripcion + " Tramitado por: " + i.Usuario.nombreUsuario, }; result.AddRange(data); } } DataSource = result; this.fechaCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "fecha", "{0:dd/M/yyyy}") }); this.importeCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "importe") }); this.cuentaCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "cuenta") }); this.conceptoCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "concepto") }); this.descripcionCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "descripcion") }); xrSubreport1.ReportSource = new SubreportTotalIngresosFecha(); }
public static Int32 subInsertarDatosConfiguracion(String psCodConfig, String psCodigo, String psValor) { try { return(ConfiguracionModel.fnActualizarConfiguracion(psCodConfig, psCodigo, psValor)); } catch (Exception ex) { throw ex; } }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); AuthConfig.RegisterAuth(); var camino = Server.MapPath("/Content/configuracion.xml"); ConfiguracionModel.CargarConfig(camino); }
private void Button_Click(object sender, RoutedEventArgs e) { ConfiguracionModel x = ModelConf; ModernDBPopulator.Properties.Settings.Default.Database = x.Database; ModernDBPopulator.Properties.Settings.Default.Entidad = x.Entidad; ModernDBPopulator.Properties.Settings.Default.Host = x.Host; ModernDBPopulator.Properties.Settings.Default.Password = x.Password; ModernDBPopulator.Properties.Settings.Default.Port = x.Port; ModernDBPopulator.Properties.Settings.Default.User = x.User; ModernDBPopulator.Properties.Settings.Default.Url = x.Url; ModernDBPopulator.Properties.Settings.Default.Save(); }
public JsonResult CheckFecha(string fecha) { var result = false; var l = fecha.Split('/'); var f = new DateTime(int.Parse(l[2]), int.Parse(l[1]), int.Parse(l[0])); var config = ConfiguracionModel.GetConfig(); if (f.Month == config.MesActual && f.Year == config.AnoActual) { result = true; } return(Json(result, JsonRequestBehavior.AllowGet)); }
public CumpleannosXFecha() { InitializeComponent(); // Info de los parametros var config = ConfiguracionModel.GetConfig(); this.mesLabel.Text = config.MesActual.ToString(); this.yearLabel.Text = config.AnoActual.ToString(); this.fechaLabel.Text = DateTime.Now.Date.ToShortDateString(); //fin Info de los parametros }
public Gastos() { InitializeComponent(); // Info de los parametros var config = ConfiguracionModel.GetConfig(); this.mesLabel.Text = config.MesActual.ToString(); this.yearLabel.Text = config.AnoActual.ToString(); this.fechaLabel.Text = DateTime.Now.Date.ToShortDateString(); //fin Info de los parametros //datos var db = new Entities(); var data = from i in db.GastoFinanzas where i.fecha.Month == config.MesActual && i.fecha.Year == config.AnoActual orderby i.fecha, i.ConceptoGastoid select new { i.fecha, i.importe, cuenta = i.Cuentas, concepto = i.SubconceptoGasto == null ? i.ConceptoGasto.concepto : i.ConceptoGasto.concepto + " - " + i.SubconceptoGasto.subconcepto, descripcion = i.descripcion == null?" Tramitado por: " + i.Usuario.nombreUsuario: i.descripcion + " Tramitado por: " + i.Usuario.nombreUsuario, }; DataSource = data.ToList(); this.fechaCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "fecha", "{0:dd/M/yyyy}") }); this.importeCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "importe") }); this.cuentaCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "cuenta") }); this.conceptoCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "concepto") }); this.descripcionCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "descripcion") }); xrSubreport1.ReportSource = new SubreportGastoTotal(); }
public Miembros() { InitializeComponent(); // Info de los parametros var config = ConfiguracionModel.GetConfig(); this.mesLabel.Text = config.MesActual.ToString(); this.yearLabel.Text = config.AnoActual.ToString(); this.fechaLabel.Text = DateTime.Now.Date.ToShortDateString(); //fin Info de los parametros //datos var db = new Entities(); var data = from i in db.Persona where i.activo && i.miembro orderby i.CategoriaPersonaid select new { nombre = i, fechaNac = i.fechaNacimiento, fechaConv = i.fechaConversion, fechaBaut = i.fechaBautismo, i.CategoriaPersona.categoria, }; DataSource = data.ToList(); this.nombreCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "nombre") }); this.fechaNacimCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "fechaNac", "{0:dd/M/yyyy}") }); this.fechaConvCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "fechaConv", "{0:dd/M/yyyy}") }); this.fechaBautCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "fechaBaut", "{0:dd/M/yyyy}") }); this.categoriaCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "categoria") }); }
public static String getConfigurationPorCodigo(String codigo) { DataTable dt = ConfiguracionModel.fnDatosConfiguracion(); String valor = ""; foreach (DataRow dr in dt.Rows) { if (dr["CodConfiguracion"].ToString().Equals(codigo)) { valor = dr["Valor"].ToString(); } } return(valor); }
public PersonasAgrupadasXCategoria() { InitializeComponent(); // Info de los parametros var config = ConfiguracionModel.GetConfig(); this.mesLabel.Text = config.MesActual.ToString(); this.yearLabel.Text = config.AnoActual.ToString(); this.fechaLabel.Text = DateTime.Now.Date.ToShortDateString(); //fin Info de los parametros xrSubreport1.ReportSource = new SubreportPersonas(); }
public ActionResult ConfiguracionHHT(ConfiguracionModel objConfiguracion) { var configuracion = new EDConfiguracion(); var usuarioActual = ObtenerUsuarioEnSesion(System.Web.HttpContext.Current); if (usuarioActual != null) { configuracion.IdEmpresa = usuarioActual.NitEmpresa.ToString(); } configuracion.Anio = int.Parse(objConfiguracion.Anio); configuracion.Mes = objConfiguracion.MesSeleccionado; configuracion.HorasLaborales = objConfiguracion.HTD; configuracion.NumeroTrabajadoresXT = objConfiguracion.XT; configuracion.DiasTrabajadosDTM = objConfiguracion.DTM; configuracion.HorasHombreHTD = objConfiguracion.HTD; configuracion.HorasExtrasNHE = objConfiguracion.NHE; configuracion.HorasAusentismoNHA = objConfiguracion.NHA; configuracion.FechaModificacion = DateTime.Now; configuracion.Total = objConfiguracion.Total; if (objConfiguracion.IsLunesViernes) { configuracion.IdDiasLaborables = 1; configuracion.DiasLaborales = 5; } else if (objConfiguracion.IsLunesSabado) { configuracion.IdDiasLaborables = 2; configuracion.DiasLaborales = 6; } else { configuracion.IdDiasLaborables = 1; configuracion.DiasLaborales = 5; } //llamado a la capa de negocio para guardado de informacion var result = lnConfiguracion.GuardarConfiguracion(configuracion); if (result) { return(Json(new { Data = "", Mensaje = "OK" })); } else { return(Json(new { Data = "", Mensaje = "FAILD" })); } }
public ActionResult AusenciasMes(string mes, string ano) { var objConfiguracion = new ConfiguracionModel(); var usuarioActual = ObtenerUsuarioEnSesion(System.Web.HttpContext.Current); var result = lnConfiguracion.AusenciasPorMes(ano, int.Parse(mes), int.Parse(usuarioActual.NitEmpresa)); if (result != null) { return(Json(new { Data = result, Mensaje = "Success" })); } else { return(Json(new { Data = string.Empty, Mensaje = "Fail" })); } }
public Compras() { InitializeComponent(); // Info de los parametros var config = ConfiguracionModel.GetConfig(); this.mesLabel.Text = config.MesActual.ToString(); this.yearLabel.Text = config.AnoActual.ToString(); this.fechaLabel.Text = DateTime.Now.Date.ToShortDateString(); //fin Info de los parametros var db = new Entities(); var data = from i in db.CompraProducto where i.fecha.Month == config.MesActual && i.fecha.Year == config.AnoActual select new { i.fecha, i.Producto, i.cantidad, importe = i.importe, i.Cuentas }; var result = new List <dynamic>(); foreach (var d in data) { result.Add(new { fecha = d.fecha.ToShortDateString(), d.Producto, cantidad = d.cantidad + " " + d.Producto.UnidadMedida.siglas, d.importe, d.Cuentas }); } DataSource = result; this.fechaCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "fecha") }); this.productoCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Producto") }); this.cantidadCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "cantidad") }); this.importeCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "importe") }); this.cuentaCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Cuentas") }); }
public void CargarDatos() { //datos var db = new Entities(); var config = ConfiguracionModel.GetConfig(); var fechaIni = (DateTime)FechaInicio.Value; var fechaFin = (DateTime)FechaFin.Value; var result = new List <dynamic>(); var lista = Concepto.Value.ToString().Split(','); foreach (var s in lista) { if (s != "") { var id = int.Parse(s); var data = from i in db.IngresoFinanzas where i.fecha >= fechaIni && i.fecha <= fechaFin && i.ConceptoIngresoid == id orderby i.fecha, i.ConceptoIngresoid select new { i.Cuentas.TipoMoneda, i.importe }; result.AddRange(data); } } var resultFinal = from r in result group r by r.TipoMoneda into resulGroup select new { moneda = resulGroup.Key, importe = resulGroup.Sum(i => (decimal)i.importe) }; DataSource = resultFinal.ToList(); this.monedaCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "moneda") }); this.importeCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "importe") }); }
public Salidas() { InitializeComponent(); // Info de los parametros var config = ConfiguracionModel.GetConfig(); this.mesLabel.Text = config.MesActual.ToString(); this.yearLabel.Text = config.AnoActual.ToString(); this.fechaLabel.Text = DateTime.Now.Date.ToShortDateString(); //fin Info de los parametros //datos var db = new Entities(); var data = from i in db.SalidaAlmacen where i.fecha.Month == config.MesActual && i.fecha.Year == config.AnoActual select new { i.fecha, producto = i.Almacen, i.cantidad, tipoAyuda = i.TipoAyuda }; DataSource = data.ToList(); this.fechaCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "fecha", "{0:dd/M/yyyy}") }); this.productoCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "producto") }); this.cantidadCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "cantidad") }); this.tipoAyudaCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "tipoAyuda") }); }
public async Task <IActionResult> Edit(ConfiguracionModel configuracion) { using (var config = new HttpClient()) { config.BaseAddress = new Uri(apiUrl + "api/Configuracion"); var putEdit = config.PutAsJsonAsync <ConfiguracionModel>("configuracion", configuracion); putEdit.Wait(); if (putEdit.Result.IsSuccessStatusCode) { return(RedirectToAction("Index")); } } return(View(configuracion)); }
public ConfiguracionModel Obtener_Empresa() { var Empresa = new ConfiguracionModel(); String StrBuscar = string.Format("Select * from Papeleria where IdPapeleria= 1"); DataTable Datos = oConexionDAL.TablaConnsulta(StrBuscar); DataRow row = Datos.Rows[0]; Empresa.IdPapeleria = Convert.ToInt32(row["IdPapeleria"]); Empresa.NombrePape = row["NombrePape"].ToString(); Empresa.MisionPape = row["MisionPape"].ToString(); Empresa.VisionPape = row["VisionPape"].ToString(); Empresa.ValoresPape = row["ValoresPape"].ToString(); Empresa.CorreoPape = row["CorreoPape"].ToString(); Empresa.TelefenoPape = row["TelefenoPape"].ToString(); Empresa.IdDireccion1 = Convert.ToInt32(row["IdDireccion1"]); Empresa.FechaRegistroPape = Convert.ToDateTime(row["FechaRegistroPape"].ToString()); Empresa.StatusPape = Convert.ToBoolean(row["StatusPape"]); return(Empresa); }
public Diezmadores() { InitializeComponent(); // Info de los parametros var config = ConfiguracionModel.GetConfig(); this.mesLabel.Text = config.MesActual.ToString(); this.yearLabel.Text = config.AnoActual.ToString(); this.fechaLabel.Text = DateTime.Now.Date.ToShortDateString(); //fin Info de los parametros //datos var db = new Entities(); var data = from i in db.IngresoFinanzas where i.ConceptoIngreso.concepto == "Diezmo" && i.fecha.Month == config.MesActual && i.fecha.Year == config.AnoActual group i by i.Persona into personaGroup select new { persona = personaGroup.Key, importeMN = personaGroup.Any(p => p.Cuentas.TipoMoneda.siglas == "MN") ? personaGroup.Where(p => p.Cuentas.TipoMoneda.siglas == "MN").Sum(j => j.importe) : 0m, importeCUC = personaGroup.Any(p => p.Cuentas.TipoMoneda.siglas == "CUC") ? personaGroup.Where(p => p.Cuentas.TipoMoneda.siglas == "CUC").Sum(j => j.importe) : 0m }; DataSource = data.ToList(); this.nombreCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "persona") }); this.importeCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "importeMN") }); this.monedaCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "importeCUC") }); }
public async Task <IActionResult> Edit(int Id) { ConfiguracionModel configuracionEdit = new ConfiguracionModel(); using (var configuracion = new HttpClient()) { configuracion.BaseAddress = new Uri(apiUrl); configuracion.DefaultRequestHeaders.Clear(); configuracion.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); HttpResponseMessage res = await configuracion.GetAsync("api/Configuracion/" + Id); if (res.IsSuccessStatusCode) { var configuracionresult = res.Content.ReadAsStringAsync().Result; configuracionEdit = JsonConvert.DeserializeObject <ConfiguracionModel>(configuracionresult); } } return(View(configuracionEdit)); }
public static String fnSelServicioActualHash() { return(ConfiguracionModel.fnSelServicioActualHash()); }