Exemple #1
0
        public IEnumerable<SalesTeam> FindByCriteria(SalesTeamCriteria c)
        {
            return this.DbContext.SalesTeams.Where(o =>
                (!c.IdSrh.HasValue || o.Id.Equals(c.IdSrh.Value))
                && (!c.IdFromSrh.HasValue || o.Id >= c.IdFromSrh.Value)
                && (!c.IdToSrh.HasValue || o.Id <= c.IdToSrh.Value)
                && (String.IsNullOrEmpty(c.NameSrh) || o.Name.Contains(c.NameSrh))

            );
        }
Exemple #2
0
 public ActionResult GetData(SalesTeamCriteria c)
 {
     var m = new LigerGridModel();
     this.BeforeGetData(c);
     var r = this.Service.FindByCriteria(c);
     this.AfterGetData(m, c, r);
     m.Total = r.RecordCount;
     r.Data.ForEach(o => {
         this.AddRowToGridModel(m, o);
     });
     this.AfterBuildGridModel(m, c, r);
     return this.Json(m, JsonRequestBehavior.AllowGet);
 }
Exemple #3
0
partial         void BeforeGetData(SalesTeamCriteria c);
Exemple #4
0
partial         void AfterGetData(LigerGridModel gm, SalesTeamCriteria c, PagedModel<SalesTeam> pm);
Exemple #5
0
partial         void AfterBuildGridModel(LigerGridModel gm, SalesTeamCriteria c, PagedModel<SalesTeam> pm);