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)); }
public int update(Model.fathercate mym) { string sql = "update fathercate set _fathername='" + mym.fathername + "' where _fathercateid=" + mym.fathercateid + ""; return(Common.DB.ExecuteSql(sql)); }
public int update(Model.fathercate mym) { DAL.fathercate dal = new DAL.fathercate(); return(dal.update(mym)); }
public int insert(Model.fathercate mym) { DAL.fathercate dal = new DAL.fathercate(); return(dal.insert(mym)); }