예제 #1
0
        public async Task <IActionResult> Update(long id)
        {
            try
            {
                var data = await _supplierManager.Find_By_Id(id);

                return(PartialView("_Update", data));
            }
            catch (Exception ex)
            {
                return(Json(new { Result = false, Message = ex.Message }));
            }
        }
예제 #2
0
        public async Task <IActionResult> View(long id)
        {
            try
            {
                var data = await _importReceiptManager.Find_By_Id(id);

                ViewData["Suplier"] = await _supplierManager.Find_By_Id(data.SupplierId);

                ViewData["listImport_Accessories"] = await _importReceiptManager.Get_List_Import_Accesories(data.Id);

                var createdBy = await _accountManager.Find_By_Id(data.CreatedBy);

                createdBy.EmployeeName   = (await _employeeManager.Find_By_Id(createdBy.EmployeeId)).Name;
                ViewData["txtCreatedBy"] = createdBy;
                ViewData["createdDate"]  = data.CreatedDate.ToString("dd/MM/yyyy");
                return(PartialView("View", data));
            }
            catch (Exception ex)
            {
                return(Json(new { Result = false, Message = ex.Message }));
            }
        }