public void BookingEvent(ModelRecord[] objM) { // 更新Room List <string> sqls = new List <string>(); foreach (var ob in objM) { clsSQLBuilder cls = new clsSQLBuilder(); cls.AddField("RECORDID", clsSQLBuilder.FieldType.FD_STRING, ob.RECORDID, false); cls.AddField("ROOMID", clsSQLBuilder.FieldType.FD_STRING, ob.ROOMID, false); cls.AddField("STARTTIME", clsSQLBuilder.FieldType.FD_DATETIME, ob.STARTTIME, false); cls.AddField("ENDTIME", clsSQLBuilder.FieldType.FD_DATETIME, ob.ENDTIME, false); cls.AddField("BOOKTYPE", clsSQLBuilder.FieldType.FD_STRING, ob.BOOKTYPE, false); cls.AddField("UPDATET", clsSQLBuilder.FieldType.FD_DATE, ob.UPDATET, false); cls.AddField("APPLIER", clsSQLBuilder.FieldType.FD_STRING, ob.APPLIER, false); cls.AddField("APPLIEREXT", clsSQLBuilder.FieldType.FD_STRING, ob.APPLIEREXT, false); cls.AddField("APPLIERID", clsSQLBuilder.FieldType.FD_STRING, ob.APPLIERID, false); cls.AddField("RECORDID", clsSQLBuilder.FieldType.FD_STRING, ob.RECORDID, false); sqls.Add(string.Format(@" insert into MBS_RECORD {0}", cls.GetString_Insert())); } DALService.ExecuteBatchNonQuery(sqls.ToArray()); }