public bool Delete(IList <int> entities) { if (entities.Count == 0) { return(false); } var list = String.Join(",", entities); var sp = new SpHelper().Add("ids", list, 1000); var a = db.SqlQuery <int>(sp.ToSpString("DeleteNhanViens"), sp.GetObject()).ToList().FirstOrDefault(); return(a == 1); }
public IEnumerable <NhanVien> GetListByPaging(string value, string index, int page, int size, string sort, out int total) { var sp = new SpHelper() .Add("value", value) .Add("index", index) .Add("page", page) .Add("size", size) .Add("sort", sort, 50) .Add("totalrow", 0, -1, true); var list = db.SqlQuery <NhanVien>(sp.ToSpString("GetNhanVienByPagingFilter"), sp.GetObject()).ToList <NhanVien>(); total = (int)sp.GetParam("totalrow").Value; return(list); }