Exemple #1
0
 public bool Actualizar_Vendedor(string nombre, string apellido, string direccion, string telefono, string n_documento,
                                 DateTime fecha_nacimiento, string email, int id_municipio, int id_sucursal)
 {
     oMunicipio.Id_municipio = id_municipio;
     oSucursal.Id_sucursal   = id_sucursal;
     oVendedor = new Comun.clsVendedor(nombre, apellido, direccion, telefono, n_documento, fecha_nacimiento, email, oMunicipio, oSucursal);
     return(D_oVendedor.Actualizar_Vendedor(oVendedor));
 }
Exemple #2
0
        public bool Actualizar_Vendedor(Comun.clsVendedor vend)
        {
            bool          Registro = false;
            SqlConnection con      = new SqlConnection();

            try
            {
                Conexion oClsConexion = new Conexion();
                con = oClsConexion.slConexion();
                con.Open();
                string     SP_ActualizarUsuario = "SP_ActualizarUsuario";
                SqlCommand cmIntVendedor        = new SqlCommand(SP_ActualizarUsuario, con);
                cmIntVendedor.CommandType = CommandType.StoredProcedure;

                cmIntVendedor.Parameters.AddWithValue("@Documento_Empleado", vend.N_documento);
                cmIntVendedor.Parameters.AddWithValue("@Nombres", vend.Nombre);
                cmIntVendedor.Parameters.AddWithValue("@Apellidos", vend.Apellidos);
                cmIntVendedor.Parameters.AddWithValue("@Direccion", vend.Direccion);
                cmIntVendedor.Parameters.AddWithValue("@Telefono", vend.Telefono);
                cmIntVendedor.Parameters.AddWithValue("@Email", vend.Email);
                cmIntVendedor.Parameters.AddWithValue("@Fecha_Nacimiento", vend.Fecha_nacimiento);
                cmIntVendedor.Parameters.AddWithValue("@Id_Municipio", vend.Municipio.Id_municipio);
                cmIntVendedor.Parameters.AddWithValue("@Id_Sucursal", vend.Sucursal.Id_sucursal);


                int intResultado = cmIntVendedor.ExecuteNonQuery();
                if (intResultado > 0)
                {
                    Registro = true;
                }
            }
            catch (Exception e)
            { Registro = false; }
            finally
            {
                // Cierro la Conexión
                con.Close();
                // Libero Recursos NO Administrados, esto me garantiza que se Cierra la Conexión
                con.Dispose();
            }
            return(Registro);
        }
Exemple #3
0
 public bool Actualizar_usuario(Comun.clsAdministrador oclsAdministrador, Comun.clsVendedor vend, Comun.clsClientes oclsCliente)
 {
     Datos.clsVendedor Vend = new Datos.clsVendedor();
     return(Vend.Actualizar_Persona(oclsAdministrador, vend, oclsCliente));
 }
Exemple #4
0
 public bool RegistrarPersona(Comun.clsAdministrador oclsAdministrador, Comun.clsVendedor vend, Comun.clsClientes oclsCliente)
 {
     Datos.clsVendedor Vend = new Datos.clsVendedor();
     return(Vend.RegistrarPersona(oclsAdministrador, vend, oclsCliente));
 }
Exemple #5
0
        public bool Actualizar_Vendedores(Comun.clsVendedor persona)

        {
            return(D_oVendedor.Actualizar_Vendedor(persona));
        }
Exemple #6
0
        public override bool Actualizar_Persona(Comun.clsAdministrador oclsAdministrador, Comun.clsVendedor vend, Comun.clsClientes oclsCliente)
        {
            bool          Registro = false;
            SqlConnection con      = new SqlConnection();

            try
            {
                Conexion oClsConexion = new Conexion();
                con = oClsConexion.slConexion();
                con.Open();
                string     SP_Actualizar_Usuarios = "dbo.SP_Actualizar_Usuarios";
                SqlCommand cmIntvendedor          = new SqlCommand(SP_Actualizar_Usuarios, con);
                cmIntvendedor.CommandType = CommandType.StoredProcedure;
                cmIntvendedor.Parameters.AddWithValue("@Fecha", vend.Fecha_registro);
                cmIntvendedor.Parameters.AddWithValue("@Nombre", vend.Nombre);
                cmIntvendedor.Parameters.AddWithValue("@Apellido", vend.Apellidos);
                cmIntvendedor.Parameters.AddWithValue("@Documento", vend.N_documento);
                cmIntvendedor.Parameters.AddWithValue("@Direccion", vend.Direccion);
                cmIntvendedor.Parameters.AddWithValue("@Telefono", vend.Telefono);
                cmIntvendedor.Parameters.AddWithValue("@Correo", vend.Email);


                int intResultado = cmIntvendedor.ExecuteNonQuery();
                if (intResultado > 0)
                {
                    Registro = true;
                }
            }
            catch (Exception e)
            { Registro = false; }
            finally
            {
                // Cierro la Conexión
                con.Close();
                // Libero Recursos NO Administrados, esto me garantiza que se Cierra la Conexión
                con.Dispose();
            }
            return(Registro);
        }
Exemple #7
0
 public abstract bool Actualizar_Persona(Comun.clsAdministrador oclsAdministrador, Comun.clsVendedor vend, Comun.clsClientes oclsCliente);
Exemple #8
0
 public abstract bool RegistrarPersona(Comun.clsAdministrador oclsAdministrador, Comun.clsVendedor vend, Comun.clsClientes oclsCliente);