public bool Delete(string empresaid, tb_pt_tejido BE)
 {
     using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid)))
     {
         using (SqlCommand cmd = new SqlCommand("gspTbPtTejido_DELETE", cnx))
         {
             {
                 cmd.CommandType = CommandType.StoredProcedure;
                 cmd.Parameters.Add("@tejidoid", SqlDbType.Char, 2).Value = BE.tejidoid;
             }
             try
             {
                 cnx.Open();
                 if (cmd.ExecuteNonQuery() > 0)
                 {
                     return true;
                 }
                 else
                 {
                     return false;
                 }
             }
             catch (Exception ex)
             {
                 throw new Exception(ex.Message);
             }
         }
     }
 }
 public DataSet GetAll_paginacion(string empresaid, tb_pt_tejido BE)
 {
     using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid)))
     {
         using (SqlCommand cmd = new SqlCommand("gspTbPtTejido_SEARCH_paginacion", cnx))
         {
             DataSet ds = new DataSet();
             {
                 cmd.CommandType = CommandType.StoredProcedure;
                 cmd.Parameters.Add("@tejidoid", SqlDbType.Char, 2).Value = BE.tejidoid;
                 cmd.Parameters.Add("@posicion", SqlDbType.Char, 10).Value = BE.posicion;
             }
             try
             {
                 cnx.Open();
                 using (SqlDataAdapter da = new SqlDataAdapter(cmd))
                 {
                     da.Fill(ds);
                 }
                 return ds;
             }
             catch (Exception ex)
             {
                 throw new Exception(ex.Message);
             }
         }
     }
 }
        public bool Update(string empresaid, tb_pt_tejido BE)
        {
            using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid)))
            {
                using (SqlCommand cmd = new SqlCommand("gspTbPtTejido_UPDATE", cnx))
                {

                    {
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Parameters.Add("@tejidoid", SqlDbType.Char, 2).Value = BE.tejidoid;
                        cmd.Parameters.Add("@tejidoname", SqlDbType.VarChar, 30).Value = BE.tejidoname;
                        cmd.Parameters.Add("@tejidodescort", SqlDbType.VarChar, 30).Value = BE.tejidodescort;
                        cmd.Parameters.Add("@estructuraid", SqlDbType.Char, 1).Value = BE.estructuraid;
                        cmd.Parameters.Add("@usuar", SqlDbType.Char, 15).Value = BE.usuar;
                    }
                    try
                    {
                        cnx.Open();
                        if (cmd.ExecuteNonQuery() > 0)
                        {
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }
                }
            }
        }
 public bool Update(string empresaid, tb_pt_tejido BE)
 {
     return tablaDA.Update(empresaid, BE);
 }
 public bool Insert(string empresaid, tb_pt_tejido BE)
 {
     return tablaDA.Insert(empresaid, BE);
 }
 public DataSet GetAll_paginacion(string empresaid, tb_pt_tejido BE)
 {
     return tablaDA.GetAll_paginacion(empresaid, BE);
 }
 public bool Delete(string empresaid, tb_pt_tejido BE)
 {
     return tablaDA.Delete(empresaid, BE);
 }