예제 #1
0
        public async Task <ActionResult> Edit(int id)
        {
            var GatewayModel = await _gatewayRepo.GetGatewayById(id);

            var SmtpGatewayModel = Mapper.Map <SMTPGatewayModel>(GatewayModel);

            if (CurrentUser.UserTypeName.ToLower() == "super admin")
            {
                SmtpGatewayModel.IsAdmin     = true;
                SmtpGatewayModel.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }
            return(View(SmtpGatewayModel));
        }
        public async Task <ActionResult> Edit(int id)
        {
            var notificationgateway = await _gatewayRepo.GetGatewayById(id);

            return(Json(notificationgateway, JsonRequestBehavior.AllowGet));
        }