public static FirstCall SearchfFirstCall(FirstCall firstCall) { AppDb.FirstCalls.Load(); FirstCalls = AppDb.FirstCalls.Local; var query = from f in FirstCalls where f.DocDateTime == firstCall.DocDateTime select f; return(query.First()); }
public static void AddFirstCall(FirstCall f) { try { AppDb.FirstCalls.Add(f); AppDb.SaveChanges(); } catch (Exception e) { MessageBox.Show(e.Message + '\n' + e.InnerException); } }
public static void RemoveFirstCall(FirstCall fc) { FirstCalls.Remove(fc); AppDb.FirstCalls.Remove(fc); AppDb.SaveChanges(); }