Example #1
0
 public DataSet GetPerfiles()
 {
     SqlParameter[] dbParams = new SqlParameter[]
     {
     };
     return(FDBHelper.ExecuteDataSet("usp_Usuario_GetPerfiles", dbParams));
 }
Example #2
0
 public DataSet GetAll()
 {
     SqlParameter[] dbParams = new SqlParameter[]
     {
     };
     return(FDBHelper.ExecuteDataSet("usp_Provedor_GetAll", dbParams));
 }
Example #3
0
 public int Eliminar(Provedor provedor)
 {
     SqlParameter[] dbParams = new SqlParameter[]
     {
         FDBHelper.MakeParam("@Id", SqlDbType.Int, 0, provedor.Id),
     };
     return(Convert.ToInt32(FDBHelper.ExecuteScalar("usp_Provedor_Eliminar", dbParams)));
 }
Example #4
0
 public int Eliminar(Usuario usuario)
 {
     SqlParameter[] dbParams = new SqlParameter[]
     {
         FDBHelper.MakeParam("@Id", SqlDbType.Int, 0, usuario.ID_Cedula),
     };
     return(Convert.ToInt32(FDBHelper.ExecuteScalar("usp_Usuario_Eliminar", dbParams)));
 }
Example #5
0
 public int Eliminar(Cliente cliente)
 {
     SqlParameter[] dbParams = new SqlParameter[]
     {
         FDBHelper.MakeParam("@Id", SqlDbType.Int, 0, cliente.Id),
     };
     return(Convert.ToInt32(FDBHelper.ExecuteScalar("usp_Cliente_Eliminar", dbParams)));
 }
Example #6
0
 public int Insertar(Categoria categoria)
 {
     SqlParameter[] dbParams = new SqlParameter[]
     {
         FDBHelper.MakeParam("@Descripcion", SqlDbType.VarChar, 0, categoria.Descripcion)
     };
     return(Convert.ToInt32(FDBHelper.ExecuteScalar("usp_Categoria_Insertar", dbParams)));
 }
Example #7
0
 public int Eliminar(Material material)
 {
     SqlParameter[] dbParams = new SqlParameter[]
     {
         FDBHelper.MakeParam("@Id", SqlDbType.Int, 0, material.Id),
     };
     return(Convert.ToInt32(FDBHelper.ExecuteScalar("usp_Material_Eliminar", dbParams)));
 }
Example #8
0
 public int Insertar(Usuario usuario)
 {
     SqlParameter[] dbParams = new SqlParameter[]
     {
         FDBHelper.MakeParam("@Login", SqlDbType.VarChar, 0, usuario.Login),
         FDBHelper.MakeParam("@ContraseƱa", SqlDbType.VarChar, 0, usuario.ContraseƱa),
         FDBHelper.MakeParam("@PerfilId", SqlDbType.SmallInt, 0, usuario.Perfil.ID_Perfil),
     };
     return(Convert.ToInt32(FDBHelper.ExecuteScalar("usp_Usuario_Insertar", dbParams)));
 }
Example #9
0
 public int Insertar(Provedor provedor)
 {
     SqlParameter[] dbParams = new SqlParameter[]
     {
         FDBHelper.MakeParam("@Descripcion", SqlDbType.VarChar, 0, provedor.Descripcion),
         FDBHelper.MakeParam("@Telefono", SqlDbType.VarChar, 0, provedor.Telefono),
         FDBHelper.MakeParam("@Email", SqlDbType.VarChar, 0, provedor.Email),
         FDBHelper.MakeParam("@Domicilio", SqlDbType.VarChar, 0, provedor.Domicilio),
     };
     return(Convert.ToInt32(FDBHelper.ExecuteScalar("usp_Provedor_Insertar", dbParams)));
 }
Example #10
0
 public int Insertar(Cliente cliente)
 {
     SqlParameter[] dbParams = new SqlParameter[]
     {
         FDBHelper.MakeParam("@Nombre", SqlDbType.VarChar, 0, cliente.Nombre),
         FDBHelper.MakeParam("@Telefono", SqlDbType.VarChar, 0, cliente.Telefono),
         FDBHelper.MakeParam("@Email", SqlDbType.VarChar, 0, cliente.Email),
         FDBHelper.MakeParam("@Domicilio", SqlDbType.VarChar, 0, cliente.Domicilio),
     };
     return(Convert.ToInt32(FDBHelper.ExecuteScalar("usp_Cliente_Insertar", dbParams)));
 }
Example #11
0
 public int Insertar(Material material)
 {
     SqlParameter[] dbParams = new SqlParameter[]
     {
         FDBHelper.MakeParam("@Descripcion", SqlDbType.VarChar, 0, material.Descripcion),
         FDBHelper.MakeParam("@Uni_Medida", SqlDbType.VarChar, 0, material.Uni_Medida),
         FDBHelper.MakeParam("@Can_Min", SqlDbType.VarChar, 0, material.Cant_Min),
         FDBHelper.MakeParam("@Can_Max", SqlDbType.VarChar, 0, material.Cant_Max),
         FDBHelper.MakeParam("@Precio", SqlDbType.VarChar, 0, material.Precio),
         FDBHelper.MakeParam("@Ganancia", SqlDbType.VarChar, 0, material.Ganancia),
     };
     return(Convert.ToInt32(FDBHelper.ExecuteScalar("usp_Material_Insertar", dbParams)));
 }