DeleteMySqlDataService.cs 942 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Linq;
  3. using MySystem.Models;
  4. using Library;
  5. namespace MySystem
  6. {
  7. public class DeleteMySqlDataService
  8. {
  9. public readonly static DeleteMySqlDataService Instance = new DeleteMySqlDataService();
  10. private DeleteMySqlDataService()
  11. { }
  12. public void Start(string TableString)
  13. {
  14. WebCMSEntities db = new WebCMSEntities();
  15. try
  16. {
  17. string[] data = TableString.Split(':');
  18. int Id = int.Parse(function.CheckInt(data[1]));
  19. string Table = data[0];
  20. }
  21. catch (Exception ex)
  22. {
  23. ErrorMsg msg = new ErrorMsg();
  24. msg.Time = DateTime.Now;
  25. msg.ErrorContent = ex.ToString();
  26. TendisDbconn.Instance.AddList("Pop:MerchantInfo:Error", msg);
  27. }
  28. db.Dispose();
  29. }
  30. }
  31. }