public void Set(License model) { DatabaseUtility.Exec("INSERT INTO BookLicense (License) VALUES (@LicenseState)", new List <SqlParameter>() { new SqlParameter("@LicenseState", model.LicenseState) }); }
public void Update(VTNetworkDevice model) { DatabaseUtility.Exec("UPDATE VTNetworkDevice SET " + "DeviceId = @DeviceId," + "YearUsingSince = @YearUsingSince," + "InventoryNo = @InventoryNo," + "SerialNumber = @SerialNumber," + "Ip = @Ip," + "Room = @Room," + "OwnerRegion = @OwnerRegion," + "InUse = @InUse," + "DateEdit = GETDATE() WHERE Id = @Id", new List <SqlParameter>() { new SqlParameter("@Id", model.Id), new SqlParameter("@DeviceId", model.DeviceId), new SqlParameter("@YearUsingSince", model.YearUsingSince), new SqlParameter("@InventoryNo", (object)model.InventoryNo ?? DBNull.Value), new SqlParameter("@SerialNumber", (object)model.SerialNumber ?? DBNull.Value), new SqlParameter("@Ip", (object)model.Ip ?? DBNull.Value), new SqlParameter("@Room", (object)model.Room ?? DBNull.Value), new SqlParameter("@Note", (object)model.Note ?? DBNull.Value), new SqlParameter("@OwnerRegion", model.OwnerRegion), new SqlParameter("@InUse", model.InUse) }); }
public void Update(License model) { DatabaseUtility.Exec("UPDATE BookLicense SET License = @LicenseState WHERE Id = @Id", new List <SqlParameter>() { new SqlParameter("@Id", model.Id), new SqlParameter("@LicenseState", model.LicenseState) }); }
public void Set(Board model) { DatabaseUtility.Exec("INSERT INTO BookBoard ( Motherboard, YearOut) VALUES (@Motherboard, @YearOut)", new List <SqlParameter>() { new SqlParameter("@Motherboard", (object)model.Motherboard ?? DBNull.Value), new SqlParameter("@YearOut", (object)model.YearOut ?? DBNull.Value) }); }
public void Delete(VTNetworkDevice model) { DatabaseUtility.Exec("DELETE FROM VTNetworkDevice WHERE Id = @Id", new List <SqlParameter>() { new SqlParameter("@Id", model.Id) }); }
public void Update(Board model) { DatabaseUtility.Exec("UPDATE BookBoard SET Motherboard = @Motherboard , YearOut = @YearOut WHERE Id = @Id", new List <SqlParameter>() { new SqlParameter("@Id", model.Id), new SqlParameter("@Motherboard", (object)model.Motherboard ?? DBNull.Value), new SqlParameter("@YearOut", (object)model.YearOut ?? DBNull.Value) }); }