Exemple #1
0
        public ActionResult MyProduct(IFormCollection fr)
        {
            ISVContext     context = HttpContext.RequestServices.GetService(typeof(ISV.Models.ISVContext)) as ISVContext;
            classviewmodel cv      = new classviewmodel();
            CompanyRecords cr      = new CompanyRecords();

            cr.id = Int32.Parse(fr["id"]);
            // cr.user_id == Int32.Parse(fr["user_id"]);
            cr.product_name         = fr["product_name"].ToString();
            cr.description          = fr["description"].ToString();
            cr.category             = fr["Category"].ToString();
            cr.modules              = fr["module"].ToString();
            cr.metatags             = fr["meta_tag"].ToString();
            cr.geographical_focus   = fr["geographical_focus"].ToString();
            cr.target_job_titles    = fr["target_job_titles"].ToString();
            cr.target_industry_type = fr["target_company_type"].ToString();
            cr.target_campany_size  = fr["target_campany_size"].ToString();
            cr.dept_user_type       = fr["dep_user_type"].ToString();
            cr.semantic             = fr["semantic"].ToString();
            cr.cognitive            = fr["cognitive"].ToString();

            var value = HttpContext.Session.GetObjectFromJson <List <Role_Permission> >("role1");

            cv.rolelist = value;
            var usernm = HttpContext.Session.GetObjectFromJson <List <User> >("userid");

            cv.usernm = usernm;
            context.updateproduct(cr, cv);
            List <CompanyRecords> a = context.GetMyProduct(cv);

            ViewBag.myproduct = a;
            cv.myproduct      = context.myproduct(cv);
            return(View(cv));
        }
Exemple #2
0
        public ActionResult MyProduct()
        {
            ISVContext     context = HttpContext.RequestServices.GetService(typeof(ISV.Models.ISVContext)) as ISVContext;
            classviewmodel cv      = new classviewmodel();
            var            value   = HttpContext.Session.GetObjectFromJson <List <Role_Permission> >("role1");

            cv.rolelist = value;
            var usernm = HttpContext.Session.GetObjectFromJson <List <User> >("userid");

            cv.usernm = usernm;
            List <CompanyRecords> a = context.GetMyProduct(cv);

            ViewBag.myproduct = a;
            cv.myproduct      = context.myproduct(cv);
            var mypro = cv.myproduct.ToString();

            HttpContext.Session.SetString("mypro", mypro);
            return(View(cv));
        }