public async Task <ActionResult> UpdateViewQA(string search) { var nhnch = new NHibernateNonCatalogStore(); var employees = new NHibernateCompanyStore(); var category = new NHibernateCategoryStore(); var supplier = new NHibernateISupplierStore(); IList <NonCatalogItemHeadModel> nonCatalogHeads = null; ViewData["Categories"] = await category.GeatAllCategoryAsync(); ViewData["pageName"] = "QuoteAnalysisUV"; ViewData["employees"] = await employees.GetAllEmployeeAsync(); ViewData["supplier"] = await supplier.GeatAllSupplierAsync(); ViewData["brand"] = await supplier.GeatAllBrandAsync(); long id; if (search == null) { nonCatalogHeads = await nhnch.FindLatestNonCatalogHeadAsync(10); } else if (long.TryParse(search, out id)) { nonCatalogHeads = await nhnch.FindIdNonCatalogHeadListAsync(id); } else { nonCatalogHeads = await nhnch.SearchNonCatalogByNameAsync(search); } return(View(nonCatalogHeads)); }
public async Task <ActionResult> QuoteAnalysis() { var category = new NHibernateCategoryStore(); var supplier = new NHibernateISupplierStore(); var employees = new NHibernateCompanyStore(); ViewData["pageName"] = "QuoteAnalysis"; ViewData["Categories"] = await category.GeatAllCategoryAsync(); ViewData["supplier"] = await supplier.GeatAllSupplierAsync(); ViewData["brand"] = await supplier.GeatAllBrandAsync(); ViewData["employees"] = await employees.GetAllEmployeeAsync(); return(View()); }