Esempio n. 1
0
        public int update(Model.Helpcate mh)
        {
            DAL.Helpcate dh     = new DAL.Helpcate();
            int          result = dh.update(mh);

            return(result);
        }
Esempio n. 2
0
        public SqlDataReader sqldatareader(Model.Helpcate mh)
        {
            DAL.Helpcate  dh  = new DAL.Helpcate();
            SqlDataReader sdr = dh.sqldatareader(mh);

            return(sdr);
        }
Esempio n. 3
0
        public int insert(Model.Helpcate mh)
        {
            DAL.Helpcate dh     = new DAL.Helpcate();
            int          result = dh.insert(mh);

            return(result);
        }
Esempio n. 4
0
        public int _delete(Model.Helpcate mh)
        {
            DAL.DALHelpcate dh     = new DAL.DALHelpcate();
            int             result = dh._delete(mh);

            return(result);
        }
Esempio n. 5
0
        public int _delete(Model.Helpcate mh)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append(" delete from helpcate  ");
            sql.Append(" where _cateid=@id  ");
            SqlParameter [] par = { new SqlParameter("@id", SqlDbType.Int, 4) };
            par[0].Value = mh.ID;
            int result = Common.DbHelperSQL.ExecuteSql(sql.ToString(), par);

            return(result);
        }
Esempio n. 6
0
        public SqlDataReader sqldatareader(Model.Helpcate mh)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append("select * from helpcate");
            sql.Append(" where _cateid = @id");
            SqlParameter[] par = { new SqlParameter("@id", SqlDbType.Int, 4) };
            par[0].Value = mh.ID;
            SqlDataReader sdr = Common.DbHelperSQL.ExecuteReader(sql.ToString(), par);

            return(sdr);
        }
Esempio n. 7
0
        public int update(Model.Helpcate mh)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append(" update helpcate set ");
            sql.Append(" _catename=@name ");
            sql.Append(" where _cateid=@id ");
            SqlParameter[] par = { new SqlParameter("@name", SqlDbType.VarChar, 50),
                                   new SqlParameter("@id",   SqlDbType.Int, 4) };
            par[0].Value = mh.Catename;
            par[1].Value = mh.ID;
            int result = DbHelperSQL.ExecuteSql(sql.ToString(), par);

            return(result);
        }
Esempio n. 8
0
        public int insert(Model.Helpcate mh)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append("insert into helpcate");
            sql.Append(" values ( ");
            sql.Append("@name");
            sql.Append(")");
            SqlParameter[] par =
            {
                new SqlParameter("@name", SqlDbType.VarChar, 50)
            };
            par[0].Value = mh.Catename;
            return(Common.DbHelperSQL.ExecuteSql(sql.ToString(), par));
        }