Esempio n. 1
0
        public ActionResult Vessels(int?companId)
        {
            var company = companId == null ? new CompanyModel() : new CompanyModel()
            {
                CompanyId = UserCompanyId
            };
            VesselServices regSrv = new VesselServices();

            return(Json(regSrv.Get(new VesselModel()
            {
                Company = company
            })));
        }
Esempio n. 2
0
        public JsonResult List(DatatableModel dt, VesselModel filters)
        {
            VesselServices services = new VesselServices();
            PagerModel     pager    = dt.ToPager();

            filters.Company.CompanyId = SessionWeb.User.CompanyId;
            var collection = services.Get(pager, filters);

            return(Json(new
            {
                status = UI.Status.Success,
                sEcho = dt.sEcho,
                iTotalRecords = pager.TotalRecords,
                iTotalDisplayRecords = pager.TotalRecords,
                aaData = collection
            }, JsonRequestBehavior.AllowGet));
        }