public static dynamic DeleteItem(DMQuanHuyen dto) { DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "danhmuc_quanhuyen", new string[] { "@flag", "@Id", "@ModifiedBy" }, new object[] { "DeleteItem", dto.Id, dto.ModifiedBy }); return((from r in tabl.AsEnumerable() select new { N = (int)(r["N"]), }).FirstOrDefault()); }
public static dynamic SaveItem(DMQuanHuyen dto) { DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "danhmuc_quanhuyen", new string[] { "@flag", "@Id", "@Ten", "@TrangThai", "@MoTa", "@Ma" }, new object[] { "SaveItem", dto.Id, dto.Ten, dto.TrangThai, dto.MoTa, dto.Ma }); return((from r in tabl.AsEnumerable() select new { N = (int)(r["N"]), }).FirstOrDefault()); }