public bool AddPresupuestos(string Diario, string Mo, string Prestaciones, string Admon, string Prod, string Ventas, string Varios, string IdPresupuestos) { using (PLMContext db = new PLMContext()) { var Presupuestos = new Presupuestos(); Presupuestos.IdPresupuesto = IdPresupuestos; Presupuestos.Diario = Diario; Presupuestos.Mo = "MX$" + Mo; Presupuestos.Prestaciones = "MX$" + Prestaciones; Presupuestos.Admon = "MX$" + Admon; Presupuestos.Prod = "MX$" + Prod; Presupuestos.Ventas = "MX$" + Ventas; Presupuestos.Varios = "MX$" + Varios; try { db.Presupuestos.Add(Presupuestos); db.SaveChanges(); return(true); } catch (Exception ex) { Dialogs.Show(ex.Message, DialogsType.Error); return(false); } } }
public void Llenar(Presupuestos p) { p.Fecha = Convert.ToDateTime(FechaTextBox.Text); p.Descripcion = DescripcionTextBox.Text; p.Monto = Convert.ToInt32(MontoTextBox.Text); p.CantidadId = Utilidades.TOINT(DropDownList1.Text); }
private void CalcularComprobantes() { Iva = Presupuestos.Sum(x => x.Iva); Retenciones = Presupuestos.Sum(x => x.Retenciones); Intereses = Presupuestos.Sum(x => x.Interes); Descuentos = Presupuestos.Sum(x => x.Descuento); Percepciones = Presupuestos.Sum(x => x.Percepciones); Retenciones = Presupuestos.Sum(x => x.Retenciones); Total = Presupuestos.Sum(x => x.Total); var subtotal = Presupuestos.Sum(x => x.SubTotal); Cobrado = Presupuestos.Sum(x => x.Cobrado); Diferencia = Total - Cobrado; Blanco = Presupuestos.Where(x => x.Iva > 0 || x.Percepciones > 0 || x.Retenciones > 0).Count(); Negro = Presupuestos.Count() - Blanco; // Series.Clear(); // Series.Add(new PieSeries { Title = "Blanco", Values = new ChartValues<decimal>(new decimal[] { Blanco }), DataLabels = true, LabelPoint = PointLabel }); // Series.Add(new PieSeries { Title = "Negro", Values = new ChartValues<decimal>(new decimal[] { Negro }), DataLabels = true, LabelPoint = PointLabel }); // Composicion.Add(new PieSeries { Title = "SubTotal", Values = new ChartValues<decimal>(new decimal[] { subtotal }), DataLabels = true, LabelPoint = PointLabel }); // Composicion.Add(new PieSeries { Title = "Iva", Values = new ChartValues<decimal>(new decimal[] { Iva }), DataLabels = true, LabelPoint = PointLabel }); // Composicion.Add(new PieSeries { Title = "Retenciones", Values = new ChartValues<decimal>(new decimal[] { Retenciones }), DataLabels = true, LabelPoint = PointLabel }); // Composicion.Add(new PieSeries { Title = "Intereses", Values = new ChartValues<decimal>(new decimal[] { Intereses }), DataLabels = true, LabelPoint = PointLabel }); // Composicion.Add(new PieSeries { Title = "Descuentos", Values = new ChartValues<decimal>(new decimal[] { Descuentos }), DataLabels = true, LabelPoint = PointLabel }); // Composicion.Add(new PieSeries { Title = "Percepciones", Values = new ChartValues<decimal>(new decimal[] { Percepciones }), DataLabels = true, LabelPoint = PointLabel }); // Composicion.Add(new PieSeries { Title = "Retenciones", Values = new ChartValues<decimal>(new decimal[] { Retenciones }), DataLabels = true, LabelPoint = PointLabel }); }
public void Buscarpresupuesto(Presupuestos p) { idpreTextBox.Text = p.PresupuestoId.ToString(); p.Fecha = Convert.ToDateTime(FechaTextBox.Text); p.Descripcion = DescripcionTextBox.Text; }
protected void Page_Load(object sender, EventArgs e) { int id = int.Parse(RouteData.Values["becario"].ToString()); becario = BecariosModelo.Encontrar(id); registro = becario.DatosAcademicos.Last(); presupuesto = becario.DatosAcademicos.Last().Presupuestos.Last(); this.txt_datos.Text = becario.DatosAcademicos.Last().ID.ToString(); if (!IsPostBack) { // Total del dinero matricula = presupuesto.matricula; manuntencion = presupuesto.manutencion; libros = presupuesto.libros; aranceles = presupuesto.aranceles; graduacion = presupuesto.trabajo_graduacion; seguro = presupuesto.seguro; this.txt_matricula.Value = "" + matricula; this.txt_manuntencion.Value = "" + manuntencion; this.txt_colegiatura.Text = "" + libros; this.txt_otros.Value = "" + aranceles; this.txt_graduacion.Value = "" + graduacion; this.txt_seguro.Value = "" + seguro; } }
protected void GuardarButton_Click(object sender, EventArgs e) { if (Validar()) { presupuesto = LlenarCampos(); PresupuestoBLL.Guardar(presupuesto); } }
public void LlenarCampos(Presupuestos presupuesto) { Limpiar(); PresupuestoTextBox.Text = presupuesto.PresupuestoId.ToString(); DescripcionTextBox.Text = presupuesto.Descripcion; this.BindGrid(); }
public static void Eliminar(int v) { Parcial2Db db = new Parcial2Db(); Presupuestos cl = db.presupuesto.Find(v); db.presupuesto.Remove(cl); db.SaveChanges(); }
private Presupuestos Llenar() { Presupuestos presupuestos = new Presupuestos(); presupuestos.Fecha = Convert.ToDateTime(FechaTextBox.Text); presupuestos.Descripcion = DescripcionTextBox.Text; presupuestos.Monto = Convert.ToInt32(MontoTextBox.Text); return(presupuestos); }
public PresupuestoArea PresupuestoActual(int ClavePresupuestoZona) { if (Presupuestos.Count == 0) { Presupuestos = PresupuestoAreaDAO.Listar().Where(p => p.ClaveArea == Clave).ToList(); } return(Presupuestos.FirstOrDefault(p => p.ClavePresupuestoZona == ClavePresupuestoZona)); }
public void LlenarCampos(Entidades.PresupuestoDetalles detalle) { foreach (GridViewRow dr in GridViewPresupuestos.Rows) { detalle.AgregarDetalle(0, 0, TextBoxNombre.Text, Convert.ToDecimal(MetaTexbox.Text), Convert.ToDecimal(LogradoTexbox.Text)); } presupuestosg = new Presupuestos(0, Convert.ToDateTime(TextFecha.Text), TextBoxNombre.Text, Convert.ToDecimal(MontoTexbo.Text)); }
public PresupuestoZona PresupuestoActual(int ClavePresupuestoDivison) { if (Presupuestos.Count == 0) { Presupuestos = PresupuestoZonaDAO.Listar().Where(p => p.ClaveZona == Clave).ToList(); } return(Presupuestos.FirstOrDefault(p => p.ClavePresupuestoDivisional == ClavePresupuestoDivison)); }
protected void Limpiar() { PresupuestoTextBox.Text = ""; PresupuestoTextBox.Enabled = true; DescripcionTextBox.Text = ""; MontoTextBox.Text = ""; ViewState["Presupuesto"] = new Presupuestos(); this.BindGrid(); }
public virtual void AgregarPresupuesto(Presupuesto presupuesto) { if (presupuesto == null) { throw new ArgumentNullException("presupuesto"); } presupuesto.Poa = this; Presupuestos.Add(presupuesto); }
protected void Page_Load(object sender, EventArgs e) { Usuarios usuario = (Usuarios)Session["usuario"]; Becarios becario = usuario.Becarios.LastOrDefault(); DatosAcademicos datos = becario.DatosAcademicos.LastOrDefault(); Presupuestos presupuesto = datos.Presupuestos.LastOrDefault(); this.txt_datos.Text = "" + datos.ID; this.txt_presupuesto.Text = "" + presupuesto.ID; }
public static bool Eliminar(Presupuestos id) { bool resultado = false; using (var db = new Repositorio <Presupuestos>()) { resultado = db.Eliminar(id); } return(resultado); }
private Presupuestos Llenar() { Presupuestos presupuesto = new Presupuestos(); presupuesto.PresupuestoId = Utilidades.TOINT(PresupuestoIdTextBox.Text); presupuesto.Descripcion = DescripcionTextBox.Text; presupuesto.Fecha = Convert.ToDateTime(FechaTextBox.Text); presupuesto.Monto = Utilidades.TOINT(MontoTextBox.Text); return(presupuesto); }
public static Presupuestos Guardar(Presupuestos n) { Presupuestos retorno = null; using (var conn = new DAL.Repositorio <Presupuestos>()) { retorno = conn.Guardar(n); } return(retorno); }
public static Presupuestos Buscar(Expression <Func <Presupuestos, bool> > tipo) { Presupuestos Result = null; using (var repositorio = new DAL.Repositorio <Presupuestos>()) { Result = repositorio.Buscar(tipo); } return(Result); }
public static Presupuestos Buscar(Expression <Func <Entidades.Presupuestos, bool> > Busqueda) { Presupuestos Result = null; using (var repoitorio = new Repositorio <Presupuestos>()) { Result = repoitorio.Buscar(Busqueda); } return(Result); }
public static bool Guardar(Presupuestos nuevo) { bool retorno = false; using (var db = new Repositorio <Presupuestos>()) { retorno = db.Guardar(nuevo) != null; } return(retorno); }
public static bool Eliminar(Presupuestos presupu) { bool eliminado = false; using (var reposi = new Repositorio <Presupuestos>()) { eliminado = reposi.Eliminar(presupu); } return(eliminado); }
public static bool Mofidicar(Presupuestos existente) { bool eliminado = false; using (var repositorio = new Repositorio <Presupuestos>()) { eliminado = repositorio.Modificar(existente); } return(eliminado); }
public Presupuestos LlenarClase() { Presupuestos Presupuesto = new Presupuestos(); Presupuesto = (Presupuestos)ViewState["Presupuesto"]; Presupuesto.PresupuestoId = Utilitarios.Utils.ToInt(PresupuestoTextBox.Text); Presupuesto.Descripcion = DescripcionTextBox.Text; return(Presupuesto); }
public static bool Eliminar(Presupuestos existente) { bool eliminado = false; using (var repositorio = new DAL.Repositorio <Presupuestos>()) { eliminado = repositorio.Eliminar(existente); } return(eliminado); }
public static bool Guardar(Presupuestos presupuestos) { if (!Existe(presupuestos.PresupuestoId)) { return(Insertar(presupuestos)); } else { return(Modificar(presupuestos)); } }
public static bool Modificar(Presupuestos presupu) { bool modifica = false; using (var reposi = new Repositorio <Presupuestos>()) { modifica = reposi.Modificar(presupu); } return(modifica); }
protected void Page_Load(object sender, EventArgs e) { Presupuestos pre = new Presupuestos(); NegocioProducto np = new NegocioProducto(); if (Session["Alias"] != null) { HyperLink3.NavigateUrl = "~/YaMaquetado/Cuenta.aspx"; lblMensaje.Text = Session["Alias"].ToString(); } }
public static bool Modificar(Presupuestos criterio) { bool mod = false; using (var db = new DAL.Repositorio <Presupuestos>()) { mod = db.Modificar(criterio); } return(mod); }
protected void AgregarButton_Click(object sender, EventArgs e) { Presupuestos Presupuesto = new Presupuestos(); Presupuesto = (Presupuestos)ViewState["Presupuesto"]; Presupuesto.AgregarDetalle(0, Presupuesto.PresupuestoId, TipoEgresoDropDownList.SelectedValue, MontoTextBox.Text); ViewState["Presupuesto"] = Presupuesto; this.BindGrid(); MontoTextBox.Text = ""; }