/// <summary> /// 增加一条数据 /// </summary> public void Add(E_Model.DeskAccount model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into SYS_DESK_ACCOUNT("); strSql.Append("DESKID,USERID)"); strSql.Append(" values ("); strSql.Append("@DESKID,@USERID)"); Database db = DatabaseFactory.CreateDatabase(); DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString()); db.AddInParameter(dbCommand, "DESKID", DbType.String, model.DESKID); db.AddInParameter(dbCommand, "USERID", DbType.String, model.USERID); db.ExecuteNonQuery(dbCommand); }
public void Add(E_Model.DeskAccount model) { dal.Add(model); }