public static void DeleteFine(string fineID) { Fine fine = fineDataContext.Fines.Where <Fine>(anonymous => anonymous.SerialNumber == fineID).Single(); fineDataContext.Fines.DeleteOnSubmit(fine); fineDataContext.SubmitChanges(); }
public static void UpdateFine(string fineId, byte paid, decimal?amount) { Fine fine = fineDataContext.Fines.Where <Fine>(anonymous => anonymous.SerialNumber == fineId).Single(); fine.Paid = paid; fine.Amount = amount; fineDataContext.SubmitChanges(); }
partial void DeleteFine(Fine instance);
partial void UpdateFine(Fine instance);
partial void InsertFine(Fine instance);
public static void AddNewFine(Fine fine) { fineDataContext.AddNewFine(fine.Type, fine.SerialNumber, fine.Date, fine.Policeman, fine.DrivingLicenseNumber, fine.Paid, fine.Reason, fine.Amount, fine.Location, fine.Hour); fineDataContext.SubmitChanges(); }