public static bool insertarHistoricoVentas(HistoricoAvanceModel histAvance) { bool insertado = false; using (FonadeDBLightDataContext db = new FonadeDBLightDataContext(conexion)) { HistorialAvancesVentas historials = new HistorialAvancesVentas { Aprobada = histAvance.Aprobada, CodVenta = histAvance.codActividad, codContacto = histAvance.codContacto, FechaAvanceEmprendedor = histAvance.FechaAvanceEmprendedor, FechaAvanceInterventor = histAvance.FechaAvanceInterventor, fechaRegistro = DateTime.Now, Mes = histAvance.Mes, ObservacionEmprendedor = histAvance.ObservacionEmprendedor, ObservacionInterventor = histAvance.ObservacionInterventor, Ventas = histAvance.Ventas, Ingreso = histAvance.Ingreso, codProyecto = histAvance.codProyecto }; db.HistorialAvancesVentas.InsertOnSubmit(historials); db.SubmitChanges(); insertado = true; } return(insertado); }
public static bool insertarHistoricoPlanOperativo(HistoricoAvanceModel histAvance) { bool insertado = false; using (FonadeDBLightDataContext db = new FonadeDBLightDataContext(conexion)) { HistorialAvancesPlanOperativo historials = new HistorialAvancesPlanOperativo { Aprobada = histAvance.Aprobada, codActividad = histAvance.codActividad, codContacto = histAvance.codContacto, FechaAvanceEmprendedor = histAvance.FechaAvanceEmprendedor, FechaAvanceInterventor = histAvance.FechaAvanceInterventor, fechaRegistro = DateTime.Now, Mes = histAvance.Mes, ObservacionEmprendedor = histAvance.ObservacionEmprendedor, ObservacionInterventor = histAvance.ObservacionInterventor, ValorAporteEmprendedor = histAvance.ValorAporteEmprendedor, ValorFondoEmprender = histAvance.ValorFondoEmprender, codProyecto = histAvance.codProyecto }; db.HistorialAvancesPlanOperativo.InsertOnSubmit(historials); db.SubmitChanges(); insertado = true; } return(insertado); }