/* * public int iddifunto { get => _iddifunto; set => _iddifunto = value; } * public int idcontrato { get => _idcontrato; set => _idcontrato = value; } * public string nombres { get => _nombres; set => _nombres = value; } * public string apellidos { get => _apellidos; set => _apellidos = value; } * public string direccionDeToma { get => _direccionDeToma; set => _direccionDeToma = value; } * public string direccionDeEntrega { get => _direccionDeEntrega; set => _direccionDeEntrega = value; } * public string CausaMuerte { get => _CausaMuerte; set => _CausaMuerte = value; } * public DateTime fechanacimiento { get => _fechanacimiento; set => _fechanacimiento = value; } * public DateTime fechanMuerte { get => _fechanMuerte; set => _fechanMuerte = value; } */ public Boolean Guardar() { Boolean Resultado = false; String Sentencia = @"INSERT INTO difuntos(nombre,apellidos,Direcciondetoma,Direcciondeentrega,CausadeMuerte,FechadeMuerte,FechadeNacimiento,contrato) VALUES('" + this.Nombres + " ','" + this.Apellidos + "','" + this.DireccionDeToma + "','" + this.DireccionDeEntrega + "','" + this.CausaMuerte + "','" + this.FechanMuerte.ToString("yyyy/MM/dd") + "','" + this.Fechanacimiento.ToString("yyyy/MM/dd") + "'," + this.Idcontrato + "); "; Console.WriteLine(Sentencia); try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
public Boolean Guardar() { Boolean Resultado = false; String Sentencia = @"INSERT INTO usuarios(usuario,clave,rol,idempleados) VALUES('" + this.usuario + "','" + this.clave + "','" + this.idrol + "','" + this.idempleado + "'); "; Console.WriteLine(Sentencia); try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
public Boolean Guardar() { Boolean Resultado = false; String Sentencia = @"INSERT INTO Usuarios(Usuario, IDRol, Clave, IDEmpleado)" + @"VALUES('" + this._Usuario + "', '" + this._IDRol + "', SHA1(MD5('" + this._Clave + "')), '" + this._IDEmpleado + "');"; try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
public Boolean Guardar() { Boolean Resultado = false; String Sentencia = @"INSERT INTO Secciones(Descripcion, Turno, Aula, Cupo, IDGrado) VALUES('" + this._Descripcion + "', '" + this._Turno + "', '" + this._Aula + "', '" + this._Cupo + "', '" + this._IDGrado + "');"; try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
/* * public int idMovimiento { get => _idMovimiento; set => _idMovimiento = value; } * public int idVendedor { get => _idVendedor; set => _idVendedor = value; } * public int idContrato { get => _idContrato; set => _idContrato = value; } * public String Concepto { get => _Concepto; set => _Concepto = value; } * public float Abono { get => _Abono; set => _Abono = value; } * public DateTime fecha { get => _fecha; set => _fecha = value; } */ public Boolean Guardar() { Boolean Resultado = false; String Sentencia = @"INSERT INTO movimientos (Fecha,idContrato,Concepto,Abono,idEmpleado) VALUES ('" + this.Fecha.ToString("yyyy/MM/dd") + "'," + this.IdContrato + ",'" + this.Concepto + "'," + this.Abono + "," + this.IdVendedor + "); "; Console.WriteLine(Sentencia); try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
public Boolean Guardar() { Boolean Resultado = false; int ultimoIngreso = CacheManager.CLS.SucursalCache.Ultima_Ingreso() + 1; String Sentencia = @"INSERT INTO sucursales(direccion,telefono) VALUES(' " + this._Direccion + " ',' " + this._Telefono + " ');" + @"Insert into sucursales_encargados(idSucursal,idEncargado) values( (select idsucursales from sucursales order by idsucursales desc limit 1) ," + this._Encargado + " );"; Console.WriteLine(Sentencia); try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
/* * public int IdTipoDeContrato { get => _idTipoDeContrato; set => _idTipoDeContrato = value; } * public float factor { get => _factor; set => _factor = value; } * public string Nombre { get => _nombre; set => _nombre = value; } * public string Descripcion { get => _Descripcion; set => _Descripcion = value; } * public int tratamientos { get => _tratamientos; set => _tratamientos = value; } */ public Boolean Guardar() { Boolean Resultado = false; String Sentencia = @"INSERT INTO tipodecontrato(nombre,Descripcion,factor,tratamiento) VALUES('" + this.Nombre + "','" + this.Descripcion + "', " + this.Factor + "," + this.Tratamientos + " ); "; Console.WriteLine(Sentencia); try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
public Boolean Guardar() { Boolean Resultado = false; String Sentencia = @"INSERT INTO Empleados(Nombres, Apellidos, FechaNacimiento, Sexo, Telefono, DUI, NIT, Titulo)" + @" VALUES('" + this.Nombres + "', '" + this._Apellidos + "', '" + this._FechaNacimiento + "', '" + this._Sexo + "', '" + this._Telefono + "', '" + this._DUI + "', '" + this._NIT + "', '" + this._Titulo + "');"; try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
/* * public int Idservicios { get => _idservicios; set => _idservicios = value; } * public string Nombre { get => _nombre; set => _nombre = value; } * public float Valorcontado { get => _valorcontado; set => _valorcontado = value; } * public float Valorcuota { get => _valorcuota; set => _valorcuota = value; } * public string Descripcion { get => _descripcion; set => _descripcion = value; } * public float Prima { get => _prima; set => _prima = value; } */ public Boolean Guardar() { Boolean Resultado = false; String Sentencia = @"INSERT INTO servicios(nombre,valorcontado,valorcuota,descripcion,prima) VALUES(' " + this.Nombre + " '," + this.Valorcontado + ", " + this.Valorcuota + " ,' " + this.Descripcion + " '," + this.Prima + " ); "; Console.WriteLine(Sentencia); try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
public Boolean Guardar() { Boolean Resultado = false; String Sentencia = @"INSERT INTO clientes(nombres,apellidos,dui,direccion,fechanacimiento,telefono,oficio) VALUES(' " + this._nombres + " ',' " + this._apellidos + " ',' " + this._dui + " ',' " + this._direccion + " ',' " + this._fechanacimiento.ToString("yyyy/MM/dd") + " ',' " + this._telefono + " ',' " + this._oficio + " '); "; Console.WriteLine(Sentencia); try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
/* * public int idcontratos { get => _idcontratos; set => _idcontratos = value; } * public int idTipoDeContrato { get => _idTipoDeContrato; set => _idTipoDeContrato = value; } * public int idServicio{ get => _idServicio; set => _idServicio = value; } * public string extendido{ get => _extendido; set => _extendido = value; } * public string Estado{ get => _Estado; set => _Estado = value; } * public string FormaDePago{ get => _FormaDePago; set => _FormaDePago = value; } * public string observaciones{ get => _observaciones; set => _observaciones = value; } * public DateTime Fecha{ get => _Fecha; set => _Fecha = value; } * public int idvendedor{ get => _idvendedor; set => _idvendedor = value; } * public int idcliente { get => _contratista; set => _contratista = value; } * public string estado{ get => _estado; set => _estado = value; } * public float saldo{ get => _saldo; set => _saldo = value; } * public int beneficiario1{ get => _beneficiario1; set => _beneficiario1 = value; } * public int beneficiario2{ get => _beneficiario2; set => _beneficiario2 = value; } */ public Boolean Guardar() { Boolean Resultado = false; String Sentencia = @"INSERT INTO contratos (extendido,tipoDeContrato,idservicios,formaspago,fecha,vendedor,contratista,Estado,monto,Beneficiario1,Beneficiario2,observaciones) VALUES ('" + this.Extendido + "'," + this.IdTipoDeContrato + "," + this.IdServicio + ", '" + this.FormaDePago + "', '" + this.Fecha.ToString("yyyy/MM/dd") + "'," + this.Idvendedor + "," + this.Contratista + ",'" + this.Estado + "'," + this.Saldo + "," + this.Beneficiario1 + "," + this.Beneficiario2 + ", '" + this.Observaciones + "'); "; Console.WriteLine(Sentencia); try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
public Boolean Guardar() { Boolean Resultado = false; int ultimoIngreso = CacheManager.CLS.SucursalCache.Ultima_Ingreso() + 1; String Sentencia = @"INSERT INTO puestos(nombre,descripcion) VALUES(' " + this._Nombre + " ',' " + this._Descripcion + "');"; Console.Write(Sentencia); try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch (Exception e) { Console.WriteLine(e.Message); Resultado = false; } return(Resultado); }
public Boolean Guardar() { Boolean Resultado = false; int ultimoIngreso = CacheManager.CLS.SucursalCache.Ultima_Ingreso() + 1; String Sentencia = @"INSERT INTO empleados(nombres,apellidos,fechanacimiento,telefono,direccion,DUI,idsucursales,fechacontratacion,puesto) VALUES(' " + this._Nombre + " ',' " + this._Apellido + " ',' " + this.dt.ToString("yyyy/MM/dd") + " ',' " + this._telefono + " ',' " + this._direccion + " ',' " + this._DUI + " ', " + this._sucursal + " ,' " + this.fechaContratacion.ToString("yyyy/MM/dd") + " ', " + this.puesto + " );"; Console.Write(Sentencia); try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
public Boolean Eliminar() { Boolean Resultado = false; String Sentencia = @"DELETE FROM Permisos WHERE IDPermiso=" + this._IDPermiso + ";"; try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
//METODOS public Boolean Guardar() { Boolean Resultado = false; String Sentencia = @"INSERT INTO Permisos(IDRol,IDOpcion) VALUES(" + this._IDRol + "," + this._IDOpcion + ");"; try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
//METODOS public Boolean Guardar() { Boolean Resultado = false; String Sentencia = @"INSERT INTO Roles(Rol) VALUES(' " + this._Rol + " ');"; try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
//Crear Maestro public Boolean GuardarMaestro() { Boolean Resultado = false; String Sentencia = @"INSERT INTO Maestros(IDEmpleado) VALUES('" + this._IDEmpleado + "')"; try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }
public Boolean Eliminar() { Boolean Resultado = false; String Sentencia = @"DELETE FROM Maestros_Secciones WHERE IDMaestro_Seccion = '" + this._IDMaestro_Seccion + "'; "; try { DataManager.CLS.OperacionBD Operacion = new DataManager.CLS.OperacionBD(); if (Operacion.Insertar(Sentencia) > 0) { Resultado = true; } else { Resultado = false; } } catch { Resultado = false; } return(Resultado); }