public object ShippersLookup(DataSourceLoadOptions options) {
     return DataSourceLoader.Load(
         from s in _nwind.Shippers orderby s.CompanyName select new {
             Value = s.ShipperID,
             Text = s.CompanyName
         },
         options
     );
 }
 public object CustomersLookup(DataSourceLoadOptions options) {
     return DataSourceLoader.Load(
         from c in _nwind.Customers orderby c.CompanyName select new {
             Value = c.CustomerID,
             Text = $"{c.CompanyName} ({c.Country})"
         },
         options
     );
 }
 public object OrderDetails(int orderID, DataSourceLoadOptions options) {
     return DataSourceLoader.Load(
         from i in _nwind.Order_Details
         where i.OrderID == orderID
         select new {
             Product = i.Product.ProductName,
             Price = i.UnitPrice,
             Quantity = i.Quantity,
             Sum = i.UnitPrice * i.Quantity
         },
         options
     );
 }
 public object GetHeadTypes(DataSourceLoadOptions loadOptions)
 {
     return(DataSourceLoader.Load(_context.RegisterHead.ToList(), loadOptions));
 }
Exemplo n.º 5
0
        public HttpResponseMessage Get(DataSourceLoadOptions loadOptions)
        {
            var obj = DataSourceLoader.Load(_giaoVIenService.Where(x => x.Deleted == false), loadOptions);

            return(Request.CreateResponse(obj));
        }
Exemplo n.º 6
0
 public object Get(DataSourceLoadOptions loadOptions)
 {
     return(DataSourceLoader.Load(_partnerBranchRepo.Get(), loadOptions));
 }
Exemplo n.º 7
0
        public async Task <LoadResult> Cards(DataSourceLoadOptions loadOptions, [FromQuery] QueryRequestModel queryRequestModel)
        {
            var response = DataSourceLoader.Load <GetFleetCardQueryable_Dto>(await Mediator.Send(new GetFleetCardQueryable_Query(queryRequestModel)), loadOptions);

            return(response);
        }
 public ActionResult GetStockPrices(DataSourceLoadOptions loadOptions)
 {
     return(Content(JsonConvert.SerializeObject(SampleData.StockPrices), "application/json"));
 }
Exemplo n.º 9
0
 public object GetBranchesByLeadType(int leadTypeId, DataSourceLoadOptions loadOptions)
 {
     return(DataSourceLoader.Load(_partnerBranchRepo.GetBranchesByLeadType(leadTypeId), loadOptions));
 }
Exemplo n.º 10
0
 public object Get(DataSourceLoadOptions loadOptions)
 {
     return(DataSourceLoader.Load(_dbContext.Usuario.ToList(), loadOptions));
 }
 public async Task <IActionResult> AddFeedbackAsync(DataSourceLoadOptions loadOptions)
 {
     return(Ok(await DataSourceLoader.LoadAsync(await Mediator.Send(new GetAllFeedbackQuery()), loadOptions)));
 }
Exemplo n.º 12
0
        public async Task <HttpResponseMessage> Get(string empresa, string usuario, DataSourceLoadOptions loadOptions)
        {
            var reponse = DataSourceLoader.Load(await Models.ClienteData.Get(empresa, usuario, User.Identity.GetEmpresaPermissao()), loadOptions);

            return(Request.CreateResponse(reponse));
        }
Exemplo n.º 13
0
        public object GetFuelCarts(DataSourceLoadOptions loadOptions)
        {
            var cartList = _context.FuelCarts;

            return(DataSourceLoader.Load(cartList, loadOptions));
        }
 public object GetDoingTasks(DataSourceLoadOptions loadOptions)
 {
     return(DataSourceLoader.Load(_doingTasksData.ListItems, loadOptions));
 }
 public object GetPlannedTasks(DataSourceLoadOptions loadOptions)
 {
     return(DataSourceLoader.Load(_plannedTasksData.ListItems, loadOptions));
 }
Exemplo n.º 16
0
 public ActionResult GetCompanies(DataSourceLoadOptions loadOptions)
 {
     return(Content(JsonConvert.SerializeObject(DataSourceLoader.Load(TabPanelData.Companies, loadOptions)), "application/json"));
 }
Exemplo n.º 17
0
        public async Task <object> GetCardCollaborationOptions(int cardId, DataSourceLoadOptions loadOptions)
        {
            var cards = await _drcCardService.GetCardCollaborationOptions(cardId);

            return(DataSourceLoader.Load(cards, loadOptions));
        }
Exemplo n.º 18
0
        public async Task <object> GetSubdomainsWithVersions(int Id, DataSourceLoadOptions loadOptions)
        {
            var SubdomainsWithVersions = await _drcCardService.GetAllSubdomainMenuItems(Id);

            return(DataSourceLoader.Load(SubdomainsWithVersions, loadOptions));
        }
Exemplo n.º 19
0
        public JsonResult OnGetCustomerFails(DataSourceLoadOptions options)
        {
            var _data = _context.Costumers.FromSql("up_FVN_PlanoDiarioFalhas @cTipoTercVendedor = {0}, @cCodTercVendedor = {1}", "V", "8077").ToList();

            return(new JsonResult(DataSourceLoader.Load(_data, options)));
        }
Exemplo n.º 20
0
 public async Task <object> GetPatients(DataSourceLoadOptions loadOptions)
 {
     //return DataSourceLoader.Load((await _bsRepository.GetPatients()).ToList(), loadOptions);
     return(await DataSourceLoader.LoadAsync(db.PatientsView, loadOptions));
 }
Exemplo n.º 21
0
 public object Get(DataSourceLoadOptions loadOptions)
 {
     return(DataSourceLoader.Load(SampleData.Orders, loadOptions));
 }
Exemplo n.º 22
0
 public object Get(DataSourceLoadOptions loadOptions)
 {
     return(DataSourceLoader.Load(SampleData.DataGridEmployees, loadOptions));
 }
 public ActionResult GetMonthlyPrices(DataSourceLoadOptions loadOptions)
 {
     return(Content(JsonConvert.SerializeObject(DataSourceLoader.Load(SampleData.MonthlyPrices, loadOptions)), "application/json"));
 }
 public object GetCountries(DataSourceLoadOptions loadOptions)
 {
     return(DataSourceLoader.Load(SampleData.Countries, loadOptions));
 }
Exemplo n.º 25
0
 public object GetBranchesByLead(Guid leadId, int leadTypeId, DataSourceLoadOptions loadOptions)
 {
     return(DataSourceLoader.Load(this.FilterBranchesByLead(leadId, leadTypeId), loadOptions));
 }
Exemplo n.º 26
0
 public object Get(DataSourceLoadOptions loadOptions)
 {
     return(DataSourceLoader.Load(_db.Subjects, loadOptions));
 }
Exemplo n.º 27
0
 public object GetBranchesByPartner(Guid partnerId, DataSourceLoadOptions loadOptions)
 {
     return(DataSourceLoader.Load(_partnerBranchRepo.GetBranchesByPartner(partnerId), loadOptions));
 }
Exemplo n.º 28
0
 public async Task <LoadResult> GetListAsync(DataSourceLoadOptions options)
 => await DataSourceLoader.LoadAsync(_dbContext.JobAdverts.OrderByDescending(x => x.DateCreated), options);
 public HttpResponseMessage Get(DataSourceLoadOptions loadOptions)
 {
     return(Request.CreateResponse(DataSourceLoader.Load(SampleData.DataGridEmployees.Where(e => e.ID <= 9), loadOptions)));
 }
Exemplo n.º 30
0
 public object load(DataSourceLoadOptions options)
 {
     return(this.load(options, this.db.menus));
 }
 public object Orders(DataSourceLoadOptions loadOptions) {
     return DataSourceLoader.Load(_nwind.Orders, loadOptions);
 }
Exemplo n.º 32
0
 public object Get(DataSourceLoadOptions loadOptions)
 {
     return(null);
 }
Exemplo n.º 33
0
 public HttpResponseMessage Get(DataSourceLoadOptions loadOptions)
 {
     return(Request.CreateResponse(DataSourceLoader.Load(SampleData.Sales, loadOptions)));
 }
Exemplo n.º 34
0
        public object GetItemChart(string Item, DataSourceLoadOptions loadOptions)
        {
            /*Check Session */
            var page            = "157";
            var typeofuser      = "";
            var PermisionAction = "";

            // CheckSession
            if (string.IsNullOrEmpty(HttpContext.Session.GetString("Username")))
            {
                Alert("กรุณา Login เข้าสู่ระบบ", NotificationType.error);
                return(RedirectToAction("Login", "Accounts"));
            }
            else
            {
                typeofuser      = HttpContext.Session.GetString("TypeOfUserId");
                PermisionAction = HttpContext.Session.GetString("PermisionAction");
                if (PermisionHelper.CheckPermision(typeofuser, PermisionAction, page) == false)
                {
                    Alert("คุณไม่มีสิทธิ์ใช้งานหน้าดังกล่าว", NotificationType.error);
                    return(RedirectToAction("Index", "Home"));
                }
            }
            /*Check Session */

            IActionResult response  = Unauthorized();
            var           queryData = "SELECT ROW_NUMBER() OVER (ORDER BY dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Header].[Order Date]) as ID,"
                                      + " LEFT(CONVERT(varchar, dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Header].[Order Date] ,112),6) as OrderDate,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Document No_] as DocumentNo,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Buy-from Vendor No_] As VendorNo,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Vendor].Name as VendorName,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].No_ As ItemNo,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Location Code] As Location,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].Description As Description,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Description 2] As Description2,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Unit of Measure] As UnitOfMeasure,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].Quantity  as Quantity,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Quantity Received]  AS Receive,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Direct Unit Cost] as UnitCost,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].Amount  as Amount,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Amount Including VAT] as AmountInludVat,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Job No_] As JobNo, "
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Job Task No_] As JobTaskNo,"
                                      + " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Header].[Posting Description] As RefPR," +
                                      " dbo." + Environment.GetEnvironmentVariable("Company") + "Item].[Inventory Posting Group] AS InventoryPostingGroupCode," +
                                      " dbo." + Environment.GetEnvironmentVariable("Company") + "Inventory Posting Group].Description as InventoryPostingGroupName, " +
                                      " dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Quantity Received]*dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Direct Unit Cost] as TotalReceive"
                                      + " FROM dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line] "
                                      + " LEFT JOIN dbo." + Environment.GetEnvironmentVariable("Company") + "Vendor] ON dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Buy-from Vendor No_] = dbo." + Environment.GetEnvironmentVariable("Company") + "Vendor].No_"
                                      + " LEFT JOIN dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Header] ON dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Header].No_ = dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].[Document No_]"
                                      + " LEFT JOIN dbo." + Environment.GetEnvironmentVariable("Company") + "Item] ON dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].No_ = dbo." + Environment.GetEnvironmentVariable("Company") + "Item].No_ "
                                      + " LEFT JOIN dbo." + Environment.GetEnvironmentVariable("Company") + "Inventory Posting Group] ON dbo." + Environment.GetEnvironmentVariable("Company") + "Item].[Inventory Posting Group] = dbo." + Environment.GetEnvironmentVariable("Company") + "Inventory Posting Group].Code "

                                      + " WHERE dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Line].No_ = {0}"
                                      + " ORDER BY dbo." + Environment.GetEnvironmentVariable("Company") + "Purchase Header].[Order Date]  ASC";

            //SqlParameter parameterItem = new SqlParameter("@item", Item);

            //ViewBag.sql = queryData;
            var V_OrderPurchaseLines = _navcontext.v_OrderPurchaseLines.FromSqlRaw(queryData, Item).ToList();


            //response = Ok(V_OrderPurchaseLines);

            return(DataSourceLoader.Load(V_OrderPurchaseLines, loadOptions));
            //return response;
        }
 public object Products(DataSourceLoadOptions loadOptions) {
     return DataSourceLoader.Load(
         _nwind.Products.Include(p => p.Category), 
         loadOptions
     );
 }
 public Task BindModelAsync(ModelBindingContext bindingContext) {
     var loadOptions = new DataSourceLoadOptions();
     DataSourceLoadOptionsParser.Parse(loadOptions, key => bindingContext.ValueProvider.GetValue(key).FirstOrDefault());
     bindingContext.Result = ModelBindingResult.Success(loadOptions);
     return Task.CompletedTask;
 }