Exemple #1
0
        public ActionResult SalesInvoiceInfo()
        {
            var concernId = Convert.ToInt32(Session["ConcernId"]);
            var userId    = Convert.ToInt32(Session["UserId"]);

            if (concernId > 0 && userId > 0)
            {
                var product  = _product.ArticleProductSettings(concernId);
                var Cons     = _product.ConstructionProductSettings(concernId);
                var cat      = _product.CategoryProductSettings(concernId);
                var soft     = _product.SoftnessProductSettings(concernId);
                var width    = _product.WidthProductSettings(concernId);
                var source   = _product.SourceProductSettings(concernId);
                var col      = _product.ColorProductSettings(concernId);
                var products = _product.Products(concernId);
                var company  = _buyer.Companies(concernId);
                var article  = _product.ArticleProductSettings(concernId);
                var region   = _sales.Regions(concernId);
                var method   = _product.PaymentMethods();
                var bank     = _product.Banks();
                var status   = _product.Statuses();
                var lenght   = _product.Lengths();
                var delivery = _product.DeliveryTypes();
                var yesNo    = _product.YesNoModels();
                ProductSettingViewModels viewModels = new ProductSettingViewModels()
                {
                    ProductSettings             = product,
                    CategoryProductSettings     = cat,
                    ColorProductSettings        = col,
                    ConstructionProductSettings = Cons,
                    SoftnessProductSettings     = soft,
                    SourceProductSettings       = source,
                    WidthProductSettings        = width,
                    Products  = products,
                    Companies = company,
                    ArticleProductSettings = article,
                    Regions        = region,
                    PaymentMethods = method,
                    Banks          = bank,
                    Statuses       = status,
                    DeliveryTypes  = delivery,
                    Lengths        = lenght,
                    YesNoModels    = yesNo
                };
                return(View(viewModels));
            }
            return(RedirectToAction("LogIn", "GlobalData", new { Area = "Global" }));
        }