public IActionResult AddPartial([FromBody] CRUDModel <DialogTemplateModel> value) { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; return(PartialView("_DialogAddPartial")); }
public IActionResult FrozenAPI() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; List <object> dd = new List <object>(); dd.Add(new { name = "Order ID", id = "OrderID" }); dd.Add(new { name = "Freight", id = "Freight" }); dd.Add(new { name = "Customer ID", id = "CustomerID" }); dd.Add(new { name = "Order Date", id = "OrderDate" }); dd.Add(new { name = "Ship Name", id = "ShipName" }); dd.Add(new { name = "Ship Address", id = "ShipAddress" }); dd.Add(new { name = "Ship City", id = "ShipCity" }); dd.Add(new { name = "Ship Country", id = "ShipCountry" }); ViewBag.columns = dd; List <object> direction = new List <object>(); direction.Add(new { name = "Left", id = "Left" }); direction.Add(new { name = "Right", id = "Right" }); direction.Add(new { name = "Center", id = "Center" }); ViewBag.direction = direction; ViewBag.DefaultButtons = new { content = "OK", isPrimary = true }; return(View()); }
public IActionResult DefaultExporting() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; return(View()); }
public ActionResult AddPartial() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; return(PartialView("_DialogAddpartial")); }
public async Task <IActionResult> PutOrdersDetails([FromRoute] int id, [FromBody] OrdersDetails ordersDetails) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != ordersDetails.id) { return(BadRequest()); } _context.Entry(ordersDetails).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OrdersDetailsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public ActionResult Editpartial(DialogTemplateModel value) { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; return(PartialView("_DialogEditpartial", value)); }
// GET: DefaultAggregate public ActionResult DefaultAggregate() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; return(View()); }
private async void LoadUserOrders() { try { if (IsBusy) { return; } IsBusy = true; OrdersDetails.Clear(); var service = new OrderHistoryService(); var details = await service.GetOrderDetailsAsync(); foreach (var order in details) { OrdersDetails.Add(order); } } catch (Exception ex) { await Application.Current.MainPage.DisplayAlert("Erreur", ex.Message, "ok"); } finally { IsBusy = false; } }
// GET: DefaultFunctionalities public ActionResult DefaultFunctionalities() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; return(View()); }
public ActionResult PdfExport(string gridModel) { GridPdfExport exp = new GridPdfExport(); Syncfusion.EJ2.Grids.Grid gridProperty = ConvertGridObject(gridModel); return(exp.PdfExport <OrdersDetails>(gridProperty, OrdersDetails.GetRecords())); }
// GET: StackedHeader public ActionResult StackedHeader() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; return(View()); }
public IActionResult RowDragAndDrop() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order.Take(24).ToList(); return(View()); }
// GET: Adaptive public ActionResult Adaptive() { var order = OrdersDetails.GetRecords(); ViewBag.datasource = order; return(View()); }
public IActionResult ColumnMenu() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; return(View()); }
public ActionResult Index() { var Order = OrdersDetails.GetAllRecords(); ViewBag.DataSource = Order; return(View()); }
// GET: DragAndDropWithInGrid public ActionResult DragAndDropWithInGrid() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; return(View()); }
void up_ord_det() { try { /* int id = int.Parse(txt_parcode.Text); * Devices devic = DB.Devices.Where(x => x.DeviceID == id).SingleOrDefault();*/ for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) { OrdersDetails ord_det = new OrdersDetails(); ord_det.OrderID = int.Parse(txt_ord_id.Text); ord_det.DeviceID = int.Parse(dataGridView1.Rows[i].Cells[0].Value.ToString()); ord_det.UnitPrice = decimal.Parse(dataGridView1.Rows[i].Cells[2].Value.ToString()); ord_det.Quantity = int.Parse(dataGridView1.Rows[i].Cells[3].Value.ToString()); ord_det.OrderDetailsNotes = txt_descrp.Text; //ord_det.DeviceID = devic.DeviceID; ord_det.DeviceID = int.Parse(dataGridView1.Rows[i].Cells[0].Value.ToString()); ord_det.SellingPrice = decimal.Parse(dataGridView1.Rows[i].Cells[2].Value.ToString()); ord_det.TotalPrice = decimal.Parse(dataGridView1.Rows[i].Cells[4].Value.ToString()); DB.OrdersDetails.Add(ord_det); DB.SaveChanges(); } } catch { } }
// GET: RowHeight public ActionResult RowHeight() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; return(View()); }
// GET: InlineEditing public ActionResult InlineEditing() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; return(View()); }
public IActionResult FrozenRows() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; return(View()); }
// GET: DialogTemplateEdit public ActionResult DialogTemplateEdit() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; return(View()); }
public async Task <IActionResult> Edit(int id, [Bind("Id,OrderId,ProductId,Amount")] OrdersDetails ordersDetails) { if (id != ordersDetails.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(ordersDetails); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OrdersDetailsExists(ordersDetails.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["OrderId"] = new SelectList(_context.Orders, "Id", "Id", ordersDetails.OrderId); ViewData["ProductId"] = new SelectList(_context.Products, "Id", "Name", ordersDetails.ProductId); return(View(ordersDetails)); }
// GET: ServerSideExporting public ActionResult ServerSideExporting() { var order = OrdersDetails.GetRecords(); ViewBag.datasource = order; return(View()); }
public IActionResult UrlDatasource([FromBody] DataManagerRequest dm) { IEnumerable DataSource = OrdersDetails.GetAllRecords(); DataOperations operation = new DataOperations(); if (dm.Search != null && dm.Search.Count > 0) { DataSource = operation.PerformSearching(DataSource, dm.Search); //Search } if (dm.Sorted != null && dm.Sorted.Count > 0) //Sorting { DataSource = operation.PerformSorting(DataSource, dm.Sorted); } if (dm.Where != null && dm.Where.Count > 0) //Filtering { DataSource = operation.PerformFiltering(DataSource, dm.Where, dm.Where[0].Operator); } int count = DataSource.Cast <OrdersDetails>().Count(); if (dm.Skip != 0) { DataSource = operation.PerformSkip(DataSource, dm.Skip); //Paging } if (dm.Take != 0) { DataSource = operation.PerformTake(DataSource, dm.Take); } return(dm.RequiresCounts ? Json(new { result = DataSource, count = count }) : Json(DataSource)); }
public IActionResult FilterMenu() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; ViewBag.filtertype = new string[] { "Menu", "Excel", "CheckBox" }; return(View()); }
public IActionResult InlineEditing() { var order = OrdersDetails.GetAllRecords(); ViewBag.datasource = order; ViewBag.ddDataSource = new string[] { "Top", "Bottom" }; return(View()); }
public object PostTest([FromBody] OrdersDetails value) { OrdersDetails.GetAllRecords().Add(value); var Data = OrdersDetails.GetAllRecords().ToList(); int count = Data.Count(); return(Json(new { result = Data, count = count })); }
public object Get() { int skip = Convert.ToInt32(HttpContext.Request.Query["$skip"].ToString()); int take = Convert.ToInt32(HttpContext.Request.Query["$top"].ToString()); var data = OrdersDetails.GetAllRecords().ToList(); return(new { Items = data.Skip(skip).Take(take).ToList(), Count = data.Count() }); }
public object Post([FromBody] Data dm) { var order = OrdersDetails.GetAllRecords(); var Data = order.ToList(); int count = order.Count(); return(dm.requiresCounts ? Json(new { result = Data.Skip(dm.skip).Take(dm.take), count = count }) : Json(Data)); }
public object Get(string id) { var queryString = Request.Query; var dataa = Convert.ToString(queryString["id"]); var data = OrdersDetails.GetAllRecords().Where(user => user.CustomerID == dataa).ToList(); return(new { Items = data, Count = data.Count() }); }