Esempio n. 1
0
        public ActionResult Create()
        {
            ContentsModel model = new ContentsModel();

            model.DomainName = UrlHelperExtensions.AbsolutePath(HttpContext.Request.Url.OriginalString);
            return(View(model));
        }
        public ActionResult Edit(int id, FormCollection fc, List <AgentBankModel> AgentBankModel)
        {
            AgencyModel model = new AgencyModel();
            var         ts    = (TravelSession)Session["TravelPortalSessionInfo"];

            model               = ser.SignUpAgentsDetail(id);
            model.CreatedBy     = ts.AppUserId;
            model.CreatedbyUser = ts.AppUserId;
            try
            {
                int[] ChkProductId = new int[1] {
                    1
                };
                int agentID = ser.Create(model, AgentBankModel, ChkProductId, fc);
                ser.UpdateSignUpAgent(id, agentID);
                ser.Approve(id);

                SecureQueryString qs = new SecureQueryString(mKey);
                model.domainname         = UrlHelperExtensions.AbsolutePath(HttpContext.Request.Url.OriginalString);
                model.UrlLinktoSendLocal = UrlHelperExtensions.AbsolutePath(HttpContext.Request.Url.OriginalString); //ConfigurationManager.AppSettings["LoginPageUrlLocal"];
                model.UrlLinktoSendLive  = "https://agent.arihantholidays.com/";                                     //ConfigurationManager.AppSettings["LoginPageUrlLive"];
                string htmlContent = RenderPartialViewToString("EMailTemplate", model);
                var    result      = ser.SendEmail(htmlContent, id, "Agency Confirmation Mail");
                return(RedirectToAction("Index", "AgentManagement"));
            }
            catch (Exception ex)
            {
                TempData["ErrorMessage"] = ex.Message;
                return(RedirectToAction("Detail", new { id = id }));
            }
        }
Esempio n. 3
0
        public ActionResult Create(ContentsModel model)
        {
            TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"];

            model.CreatedBy  = obj.AppUserId;
            model.DomainName = UrlHelperExtensions.AbsolutePath(HttpContext.Request.Url.OriginalString);

            try
            {
                ser.CreateContents(model);
            }
            catch
            {
            }
            return(RedirectToAction("Index"));
        }