public int GetInsert(M_Exroom exroom) { string sqlStr = "INSERT INTO [dbo].[ZL_Exroom] ([RoomName],[Starttime],[Endtime],[ExaID],[AddTime],[Stuidlist]) VALUES (@RoomName,@Starttime,@Endtime,@ExaID,@AddTime,@Stuidlist);select @@IDENTITY"; SqlParameter[] cmdParams = exroom.GetParameters(exroom); return(SqlHelper.ObjectToInt32(SqlHelper.ExecuteScalar(CommandType.Text, sqlStr, cmdParams))); }
public int insert(M_Exroom model) { return(Sql.insert(strTableName, model.GetParameters(model), BLLCommon.GetParas(model), BLLCommon.GetFields(model))); }
public bool GetUpdate(M_Exroom model) { return(Sql.UpdateByIDs(strTableName, PK, model.ExrID.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters(model))); }