Guest User

Untitled

a guest
Oct 22nd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. private void SettingsDLT_delete_button_Click(object sender, EventArgs e)
  2. {
  3. MainWeight main = new MainWeight();
  4. main.RemoveAllWeight();
  5. }
  6.  
  7. public void RemoveAllWeight()
  8. {
  9. try
  10. {
  11. using (DaghanKantarEntities context = new DaghanKantarEntities())
  12. {
  13. context.tbl_MainWeight.RemoveRange(
  14. context.tbl_MainWeight.Where(c => c.fldId != null));
  15. context.SaveChanges();
  16. }
  17. }
  18. catch (Exception exp)
  19. {
  20. throw new Exception("Hata: Kayıt Silinemedi - " + exp.Message.ToString(), exp);
  21. }
  22. }
  23.  
  24. DBCC CHECKIDENT ('table_name', RESEED, 1)
Add Comment
Please, Sign In to add comment