예제 #1
0
        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)));
        }
예제 #2
0
 public int insert(M_ExStudent model)
 {
     return(Sql.insert(strTableName, model.GetParameters(model), model.GetParas(), model.GetFields()));
 }
예제 #3
0
 public bool GetUpdate(M_ExStudent model)
 {
     return(Sql.UpdateByIDs(strTableName, PK, model.Stuid.ToString(), model.GetFieldAndPara(), model.GetParameters(model)));
 }