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