示例#1
0
        public int insert(Model.fathercate mym)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append("insert into fathercate ");

            sql.Append(" values (");

            sql.Append("@fathername");

            sql.Append(")");

            SqlParameter[] par =
            {
                new SqlParameter("@fathername", SqlDbType.VarChar, 50),
            };



            par[0].Value = mym.fathername;

            return(Common.DbHelperSQL.ExecuteSql(sql.ToString(), par));
        }
示例#2
0
        public int update(Model.fathercate mym)
        {
            string sql = "update fathercate set _fathername='" + mym.fathername + "' where _fathercateid=" + mym.fathercateid + "";

            return(Common.DB.ExecuteSql(sql));
        }
示例#3
0
 public int update(Model.fathercate mym)
 {
     DAL.fathercate dal = new DAL.fathercate();
     return(dal.update(mym));
 }
示例#4
0
 public int insert(Model.fathercate mym)
 {
     DAL.fathercate dal = new DAL.fathercate();
     return(dal.insert(mym));
 }