Exemplo n.º 1
0
        public ActionResult Detail(int Id = 0)
        {
            ViewBag.Height = (int)(Request.Browser.ScreenPixelsHeight * 0.85);
            TB_SERVICES d = Services_Service.GetById(Id);

            List <TB_TYPE_DETAILS> types = Types_Service.GetAllDetails(d.ServiceTypeCode);

            ViewBag.Types = types;
            List <TB_SERVICE_DETAILS> details = Services_Service.GetAllDetails(Id);

            ViewBag.Details = details;

            List <TB_FILES> file     = Files_Service.GetByRefecense("" + Id).Where(x => x.FileType == "SERVICE").ToList();
            List <TB_TYPES> listType = Types_Service.GetAll();

            ViewBag.Files    = file;
            ViewBag.ListType = listType;

            List <TB_MENUS> listMenu = new List <TB_MENUS>();

            listMenu      = Menu_Service.GetByServiceId(Id);
            ViewBag.Menus = listMenu;

            return(View(d));
        }
Exemplo n.º 2
0
        public PartialViewResult _ChiTiet(string productId = "")
        {
            int height = (int)(Request.Browser.ScreenPixelsHeight * 0.85);

            TB_PRODUCTS s = Products_Service.GetById(productId);

            ViewBag.Product = s;

            List <TB_SUPPLIERS> list = Suppliers_Service.GetAll()
                                       .Where(x => x.SupplierState == "A").ToList();

            ViewBag.SupplierList = list;

            List <TB_CATEGORIES> list2 = Categories_Service.GetAll()
                                         .Where(x => x.CategoryState == "A").ToList();

            ViewBag.CategoryList = list2;

            try
            {
                ViewBag.Images = Files_Service.GetByRefecense("" + s.ProductCode).Where(x => x.FileType == "PRODUCT").ToList();
            }
            catch (Exception ex)
            {
                CORE.Helpers.IOHelper.WriteLog(StartUpPath, IpAddress, "Blogs/_List :", ex.Message, ex.ToString());
            }

            return(PartialView(height));
        }
Exemplo n.º 3
0
        public ActionResult Detail(string Id = "")
        {
            TB_PRODUCTS d = Products_Service.GetById(Id);

            List <TB_FILES> file = Files_Service.GetByRefecense(Id).Where(x => x.FileType == "PRODUCT").ToList();

            ViewBag.Files = file;

            return(View(d));
        }
Exemplo n.º 4
0
        public PartialViewResult _ChiTiet(int blogId = 0)
        {
            int height = (int)(Request.Browser.ScreenPixelsHeight * 0.85);

            TB_BLOGS b = Blogs_Service.GetById(blogId);

            ViewBag.Blog = b;

            try
            {
                ViewBag.Images = Files_Service.GetByRefecense("" + b.BlogId).Where(x => x.FileType == "BLOG").ToList();
            }
            catch (Exception ex)
            {
                CORE.Helpers.IOHelper.WriteLog(StartUpPath, IpAddress, "Blogs/_List :", ex.Message, ex.ToString());
            }

            return(PartialView(height));
        }
Exemplo n.º 5
0
        public ActionResult MenuDetail(int serviceId = 0)
        {
            int height = (int)(Request.Browser.ScreenPixelsHeight * 0.85);

            TB_SERVICES s = Services_Service.GetById(serviceId);

            ViewBag.Service = s;

            List <TB_TYPES> list = Types_Service.GetAll();

            ViewBag.TypeList = list;

            try
            {
                ViewBag.Images = Files_Service.GetByRefecense("" + s.ServiceId).Where(x => x.FileType == "SERVICE").ToList();
            }
            catch (Exception ex)
            {
                CORE.Helpers.IOHelper.WriteLog(StartUpPath, IpAddress, "Blogs/_List :", ex.Message, ex.ToString());
            }

            return(PartialView(height));
        }