public int GetInsert(M_ExStudent exStudent) { string sqlStr = "INSERT INTO [dbo].[ZL_ExStudent] ([Stuname],[Stupassword],[Stucardno],[Userid],[Exptime],[Lognum],[Examnum],[Logtimeout],[Stugroup],[Regulation],[strCompetence],[Course],[Qualified],[Addtime]) VALUES (@Stuname,@Stupassword,@Stucardno,@Userid,@Exptime,@Lognum,@Examnum,@Logtimeout,@Stugroup,@Regulation,@strCompetence,@Course,@Qualified,@Addtime);select @@IDENTITY"; SqlParameter[] cmdParams = initmod.GetParameters(exStudent); return(SqlHelper.ObjectToInt32(SqlHelper.ExecuteScalar(CommandType.Text, sqlStr, cmdParams))); }
public int insert(M_ExStudent model) { return(Sql.insert(strTableName, model.GetParameters(model), model.GetParas(), model.GetFields())); }
public bool GetUpdate(M_ExStudent model) { return(Sql.UpdateByIDs(strTableName, PK, model.Stuid.ToString(), model.GetFieldAndPara(), model.GetParameters(model))); }