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

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

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

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

            return(result);
        }
Example #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);
        }
Example #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);
        }
Example #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);
        }
Example #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));
        }