예제 #1
0
        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));
        }
예제 #2
0
        public async Task <ActionResult> UpdatePO(POViewModel value)
        {
            var nhpa      = new NHibernatePOStore();
            var employees = new NHibernateCompanyStore();
            var po        = await nhpa.FindPOAByIdAsync(value.Id);

            ViewData["employees"] = await employees.GetAllEmployeeAsync();

            return(PartialView(po));
        }
예제 #3
0
        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());
        }
        public async Task <ActionResult> Register()
        {
            NHibernateCompanyStore nhcs = new NHibernateCompanyStore();
            var Companies = await nhcs.GetAllCompanyAsync();

            var Positions = await nhcs.GetAllPositionAsync();

            var Departments = await nhcs.GetAllDepartmentAsync();

            var Teams = await nhcs.GetAllTeamAsync();

            var Employees = await nhcs.GetAllEmployeeAsync();

            ViewData["Companies"]   = Companies;
            ViewData["Positions"]   = Positions;
            ViewData["Departments"] = Departments;
            ViewData["Teams"]       = Teams;
            ViewData["Employees"]   = Employees;
            ViewData["ApiServer"]   = Config.GetApiServerURL();
            return(View());
        }
예제 #5
0
        public async Task <ActionResult> AddingLinesToPo(POViewModel value)
        {
            var nhpa      = new NHibernatePOStore();
            var nhpr      = new NHibernatePRStore();
            var employees = new NHibernateCompanyStore();
            var po        = await nhpa.FindPOAByIdAsync(value.Id);

            List <PRLinesModel> prlines = new List <PRLinesModel>();

            foreach (var line in value.Lines)
            {
                var prline = await nhpr.GetPRLineAsync(line.PRLineId);

                if (prline != null)
                {
                    prlines.Add(prline);
                }
            }
            ViewData["prlines"]   = prlines;
            ViewData["employees"] = await employees.GetAllEmployeeAsync();

            return(PartialView(po));
        }