Esempio n. 1
0
        public async Task <IActionResult> Create()
        {
            try
            {
                ViewData["listManufac"] = await _motorManufactureManager.Get_List("", (byte)StatusEnum.Active);

                return(PartialView("_Create"));
            }
            catch (Exception ex)
            {
                return(Json(new { Result = false, Message = ex.Message }));
            }
        }
        public async Task <IActionResult> Get_List(string name, byte status)
        {
            try
            {
                var data = await _motorManufactureManager.Get_List(name, status);

                if (data != null)
                {
                    data = data.OrderByDescending(c => c.Id).ToList();
                }
                return(PartialView("_List", data));
            }
            catch (Exception ex)
            {
                return(Json(new { Result = false, Message = ex.Message }));
            }
        }