Ejemplo n.º 1
0
        public ActionResult ConfigureResource(ResourceConfigModel model)
        {
            if(ModelState.IsValid)
            {
                resourceMgt = new ResourceManagement(User.Identity.GetUserId<int>());
                Resrouce_interface api = new Resrouce_interface()
                {
                    Id = model.Id,
                    Resource_id = model.ResoucedId,
                    APIURL = model.ApiUrl,
                    ProductApiUrl = model.ProductFetchUrl,
                    CallBackUrl = model.CallBack,
                    Interface_classname = model.InterfaceName,
                    Interface_assemblyname = model.InterfaceAssemblyName,
                    Username = model.UserName,
                    Userpassword = model.Password,
                    AppKey=model.AppKey,
                    AppSecret=model.AppSecret,
                    GetTokenUrl=model.GetTokenURL,
                    QueryStatusUrl=model.QueryStatusURL
                };

                if(resourceMgt.UpdateResrouceInterface(api))
                {
                    return RedirectToAction("Resources");
                }
            }

            return View();
        }