Exemplo n.º 1
0
        public ActionResult AddNews()
        {
            NewsDataStore    ObjDal          = new NewsDataStore();
            SA_NewsViewModel objCatViewModel = new SA_NewsViewModel();

            objCatViewModel.ProductList = ObjDal.GetProductList();

            return(View("add-News", objCatViewModel));
        }
Exemplo n.º 2
0
        public ActionResult AddNews()
        {
            ViewBag.NewsProducts = new List <SA_NewsAndProductRelation>();
            NewsDataStore    ObjDal          = new NewsDataStore();
            SA_NewsViewModel objCatViewModel = new SA_NewsViewModel();

            objCatViewModel.ProductList = ObjDal.GetProductList();

            return(View("add-News", objCatViewModel));
        }
Exemplo n.º 3
0
        public ActionResult EditNews(int id)
        {
            NewsDataStore         Obj         = new NewsDataStore();
            SA_News               obj         = Obj.GetNewsByid(id);
            List <SelectListItem> productList = Obj.GetProductList();
            SA_NewsViewModel      objSaCatV   = new SA_NewsViewModel();

            objSaCatV.id              = obj.id;
            objSaCatV.NewsName        = obj.NewsName;
            objSaCatV.NewsDiscription = obj.NewsDiscription;
            objSaCatV.URL             = obj.URL;
            objSaCatV.MetaDiscription = obj.MetaDiscription;
            objSaCatV.Keywords        = obj.Keywords;
            objSaCatV.ProductList     = productList;
            objSaCatV.Product         = obj.Product.ToString();



            return(View("add-News", objSaCatV));
        }