Example #1
0
        public async Task StartAsync(IDialogContext context)
        {
            var message = context.Activity as IMessageActivity;
            var query   = FeedbackForm.Parse(message.Value);

            await context.PostAsync("Looks all good. Program me to send the feedback email");
        }
Example #2
0
    protected void btnSubmit_OnClick(object sender, EventArgs e)
    {
        Configuration configuration =
            WebConfigurationManager.OpenWebConfiguration("~/");

        PagesSection pagesSection = (PagesSection)configuration.GetSection("system.web/pages");

        BusiBlocks.Notification.BusiBlocksSmtpNotificationProvider bb = new BusiBlocks.Notification.BusiBlocksSmtpNotificationProvider();

        FeedbackForm form = new FeedbackForm()
        {
            Type     = ddlFeedbackType.SelectedValue,
            Subject  = txtSubject.Text,
            Comments = txtComments.Text,
            Theme    = pagesSection.Theme.ToString(),
            Browser  = Request.Browser.Type,
            Page     = this.Page.ToString(),
            Time     = DateTime.Now,
            UserId   = Page.User.Identity.Name
        };

        bb.SendMail(CreateMessageFromTemplate(form));
        FeedbackFormManager.CreateFeedbackFormRequest(form);
        ClearFields();
    }
        protected void BtnUpdate_Click(object sender, EventArgs e)
        {
            FeedbackForm    cusObj = new FeedbackForm();
            FeedbackFormDAO cusDao = new FeedbackFormDAO();

            str    = Convert.ToString(Session["FeedBackIdStudentUpdate"].ToString());
            cusObj = cusDao.GetSpecificFeedBack(str);

            String Affordability     = AffordabilityDropDownUpdate.SelectedValue.ToString();
            String Enjoyment         = EnjoymentDropDownUpdate.SelectedValue.ToString();
            String Freedom           = FreedomDropBoxUpdate.SelectedValue.ToString();
            String ReviewPros        = HighlightTbUpdate.Text.ToString();
            String ReviewCons        = DownsidesTbUpdate.Text.ToString();
            String ReviewImprovement = ImprovementTbUpdate.Text.ToString();

            FeedbackForm    selTD = new FeedbackForm();
            FeedbackFormDAO updTD = new FeedbackFormDAO();
            int             updCnt;

            updCnt = updTD.updateOwnFB(Affordability, Enjoyment, Freedom, ReviewPros, ReviewCons, ReviewImprovement, Session["FeedBackIdStudentUpdate"].ToString());

            if (updCnt == 1)
            {
                LblResult.Text = "Feedback Submitted! Thank you! You will be redirected in 5 seconds to the homepage!";
                Response.AddHeader("REFRESH", "5;URL=http://localhost:3355");
            }
        }
Example #4
0
        public ActionResult Contacts(FeedbackForm Form)
        {
            MailMessage message = new MailMessage();

            message.From = new MailAddress("*****@*****.**");
            message.To.Add(new MailAddress("*****@*****.**"));
            message.Subject = Form.Them;
            message.Body    = Form.Name + '\n' + Form.Email + '\n' + Form.Mes;
            SmtpClient client = new SmtpClient("mail.sovetov9.ru")
            {
                EnableSsl = false,
                Port      = 587,

                DeliveryMethod        = SmtpDeliveryMethod.Network,
                UseDefaultCredentials = false,
                Credentials           = new NetworkCredential("*****@*****.**", "4arpZ0M!")
            };

            try
            {
                client.Send(message);
            }
            catch (SmtpException ex)
            {
                SmtpException tempEx = ex;
            }
            ViewBag.Message = true;
            return(View(new FeedbackForm()
            {
                Email = String.Empty, Mes = String.Empty, Name = String.Empty, Them = String.Empty
            }));
        }
Example #5
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            FeedbackForm = await _context.FeedbackForm.FindAsync(id);

            if (FeedbackForm != null)
            {
                _context.FeedbackForm.Remove(FeedbackForm);
                if (await _context.SaveChangesAsync() > 0)
                {
                    var auditrecord = new AuditRecord();
                    auditrecord.AuditActionType = "Feedback Form Deleted";
                    auditrecord.DateTimeStamp   = DateTime.Now;
                    auditrecord.ComputerID      = FeedbackForm.ID;
                    var userID = User.Identity.Name.ToString();
                    auditrecord.Username = userID;
                    _context.AuditRecords.Add(auditrecord);
                    await _context.SaveChangesAsync();
                }
            }

            return(RedirectToPage("./Index"));
        }
Example #6
0
        /// <summary>
        /// Create a new feedback form diplaying either the next or the previous template in the list
        /// In case the Form can't move neither forward nor backward, it will stay in the current position
        /// </summary>
        /// <param name="direction"> Direction user is travelling in list: Forward, Backward, Current. </param>
        /// <param name="currentPosition"> The applicant position in the list: Integer </param>
        /// <returns></returns>
        ///
        public static FeedbackForm NextForm(Direction direction, int currentPosition)
        {
            FeedbackForm _instance;

            switch (direction)
            {
            // In case direction is Forward, the next feedback form will be one step ahead
            case Direction.Forward:
                _instance = new FeedbackForm((currentPosition + 1));
                break;

            // In case direction is Backward, the next feedback form will be one step back
            case Direction.Backward:
                _instance = new FeedbackForm((currentPosition - 1));
                break;

            // In case direction is Current, the next feedback form will be the same
            case Direction.Current:
                _instance = new FeedbackForm((currentPosition));
                break;

            // The first postition
            default:
                _instance = new FeedbackForm(0);
                break;
            }

            return(_instance);
        }
 public GraphicMatchController(IMatchView view)
 {
     myObservers     = new List <IControllerObserver>();
     this.myView     = view;
     view.Controller = this;
     myFeedbackForm  = new FeedbackForm();
 }
Example #8
0
        public async Task <IActionResult> GetFormBykey([FromQuery] string key)
        {
            var talk = _dbRepository.GetTalkByEasyAccessKey(key);

            if (talk == null)
            {
                return(NotFound($"Could not find talk with easy access key: {key}"));
            }

            var questionnaire = _dbRepository.GetQuestionnaire(talk.Id);

            if (questionnaire == null)
            {
                return(NotFound($"Could not find feedback form with talk id key: {talk.Id}"));
            }

            var feedbackForm = new FeedbackForm();

            feedbackForm.TalkId        = talk.Id;
            feedbackForm.TalkName      = talk.Name;
            feedbackForm.SpeakerName   = talk.SpeakerName;
            feedbackForm.EasyAccessKey = talk.EasyAccessKey;
            feedbackForm.Questionnaire = questionnaire;
            feedbackForm.Description   = talk.Description;

            return(Ok(feedbackForm));
        }
        public async Task CreateFeedback_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            var unitUnderTest = this.CreateFeedbackController();

            mockFeedbackBusiness.Setup(r => r.AddAsync(
                                           It.IsAny <PagingOptions>(),
                                           It.IsAny <SortOptions <Question, QuestionEntity> >(),
                                           It.IsAny <SearchOptions <Question, QuestionEntity> >(),
                                           It.IsAny <FeedbackForm>())).Returns(Task.CompletedTask);

            PagingOptions pagingOptions = new PagingOptions()
            {
                Limit = 1, Offset = 1
            };
            SortOptions <Question, QuestionEntity> sortOptions = new SortOptions <Question, QuestionEntity>()
            {
                OrderBy = new string[] { "" }
            };
            SearchOptions <Question, QuestionEntity> searchOptions = new SearchOptions <Question, QuestionEntity>()
            {
                Search = new string[] { "" }
            };
            FeedbackForm feedback = new FeedbackForm();

            // Act
            var result = await unitUnderTest.CreateFeedback(
                pagingOptions,
                sortOptions,
                searchOptions,
                feedback);

            // Assert
            Assert.IsType <OkResult>(result);
        }
Example #10
0
        public ActionResult Contact(FeedbackForm feedbackForm)
        {
            StringBuilder sb   = new StringBuilder();
            MailMessage   mail = new MailMessage();

            //To revisit this as this a feedback from website and not
            //MailAddress from = new MailAddress(feedbackForm.UserEmailAddress);
            MailAddress from = new MailAddress(COMPANY_EMAIL);

            //Append the collections from the form
            sb.Append("User Name:  " + feedbackForm.UserName + "\n");
            sb.Append("User Postcode: " + feedbackForm.UserPostcode + "\n");
            sb.Append("User Email " + feedbackForm.UserEmailAddress + "\n");
            sb.Append("User Phone Number: " + feedbackForm.UserPhoneNumber + "\n\n");
            sb.Append("User Message: " + feedbackForm.UserMessage + "\n");
            sb.Append("\n\nKind regards, XYZ\n");

            //Lets construct the email
            mail.From = from;
            mail.To.Add(COMPANY_EMAIL);
            mail.Subject = "Feedback from the Website";
            mail.Body    = sb.ToString();

            //Set the SMTP
            SmtpClient smtp = new SmtpClient();

            smtp.Host = "smtp.healthcareaccessltd.co.uk";
            smtp.Port = 587;
            smtp.Send(mail);


            return(View());
        }
Example #11
0
    private MailMessage CreateMessageFromTemplate(FeedbackForm form)
    {
        MailMessage message     = new MailMessage();
        var         xmlDocument = new XmlDocument();

        string xmlFile = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data/MailTemplate_Feedback.xml");

        xmlDocument.Load(xmlFile);
        XmlNodeList blockNodes = xmlDocument.GetElementsByTagName("body");


        foreach (XmlNode node in blockNodes)
        {
            message.Body = node.InnerText;
        }

        User   user   = MembershipManager.GetUserByName(form.UserId);
        Person person = PersonManager.GetPersonByUserId(user.Id);

        message.From = new MailAddress((!string.IsNullOrEmpty(person.Email)) ? person.Email : "*****@*****.**");
        message.To.Add(new MailAddress("*****@*****.**"));
        message.Subject = form.Type + "-" + form.Subject;
        message.Body    = ReplaceTokens(message.Body, form, user, person);

        return(message);
    }
Example #12
0
        public HttpResponseMessage Post(FeedbackForm feedback)
        {
            var mailInfo = WebBookingHelper.CreateMail(feedback, LoadTemplate("feedback.html"));

            EmailService.SendMail(mailInfo);
            return(Request.CreateResponse(HttpStatusCode.OK));
        }
        public ActionResult FeedbackForm(FeedbackForm model)
        {
            // this is your uploaded file
            var file = model.ProjectInformation;


            return(View());
        }
 public IActionResult SampleFormModel(FeedbackForm model)
 {
     if (model.RedirectMe == "1")
     {
         return(RedirectToAction(nameof(Index)));
     }
     return(View(model));
 }
        public async Task AddAsync(
            PagingOptions pagingOptions,
            SortOptions <Question, QuestionEntity> sortOptions,
            SearchOptions <Question, QuestionEntity> searchOptions,
            FeedbackForm feedback)
        {
            var questions = await _feedbackService.GetAllByFeedbackTypeAsync(
                pagingOptions,
                sortOptions,
                searchOptions,
                feedback.FeedbackType, CancellationToken.None);

            var feedbackModel = new Feedback();

            foreach (var reason in feedback.Reason)
            {
                var question = questions.Items.Single(x => x.Id.Equals(reason.QuestionId));

                feedbackModel.Attended     = question.FeedbackType.Equals("participated");
                feedbackModel.NotAttended  = question.FeedbackType.Equals("notparticipated");
                feedbackModel.Unregistered = question.FeedbackType.Equals("unregistered");

                if (question.CustomQuestion)
                {
                    var dbAnswer = question.Answers.Single(a => a.Id.Equals(Guid.Parse(reason.AnswerId)));
                    feedbackModel.ReasonId = Guid.Parse(reason.AnswerId);
                    feedbackModel.Rating   = Convert.ToInt32(dbAnswer.Description);
                }

                if (!question.FreeTextQuestion)
                {
                    var dbAnswer = question.Answers.Single(a => a.Id.Equals(Guid.Parse(reason.AnswerId)));
                    feedbackModel.ReasonId = Guid.Parse(reason.AnswerId);
                    feedbackModel.Cons     = dbAnswer.Description;
                }

                if (question.FreeTextQuestion && question.Description.Contains("like"))
                {
                    feedbackModel.Pros = reason.AnswerId;
                }
                if (question.FreeTextQuestion && question.Description.Contains("improved"))
                {
                    feedbackModel.Cons = reason.AnswerId;
                }
            }

            var created = await _feedbackService.AddAsync(feedbackModel, feedback.EventId);

            var participant = await _participantService.FindAsync(feedback.ParticipantId, CancellationToken.None);

            await _emailService.SendAsync("*****@*****.**", "Admin", participant.EmployeeId, "Feedback Received", "Thanks for the feedback.");

            participant.FeedbackId         = created;
            participant.IsFeedbackReceived = true;

            await _participantService.UpdateAsync(participant);
        }
 public FeedbackController(
     IBlobStorage blobStorage,
     ILogger <FeedbackController> logger,
     IOptions <FeedbackForm> feedbackFormSettings)
 {
     this.blobStorage          = blobStorage;
     this.logger               = logger;
     this.feedbackFormSettings = feedbackFormSettings.Value;
 }
        public static void Seed(this ModelBuilder modelBuilder)
        {
            CompanyType[] companyTypeArray1 = new CompanyType[2];
            CompanyType   companyType1      = new CompanyType();

            companyType1.Id      = 1;
            companyType1.Code    = "CAFE";
            companyType1.Name    = "Cafe";
            companyTypeArray1[0] = companyType1;
            CompanyType companyType2 = new CompanyType();

            companyType2.Id      = 2;
            companyType2.Code    = "RESTAURANT";
            companyType2.Name    = "Restoran";
            companyTypeArray1[1] = companyType2;
            CompanyType[] companyTypeArray2 = companyTypeArray1;
            modelBuilder.Entity <CompanyType>().HasData(companyTypeArray2);
            Company company1 = new Company();

            company1.Id            = 1;
            company1.Name          = "Yetkilim A.Ş";
            company1.CompanyTypeId = 1;
            company1.CreatedDate   = DateTime.Now;
            company1.CreatedBy     = nameof(Seed);
            Company company2 = company1;

            modelBuilder.Entity <Company>().HasData(new Company[1]
            {
                company2
            });
            PanelUser[] panelUserArray1 = new PanelUser[1];
            PanelUser   panelUser       = new PanelUser();

            panelUser.Id          = 1;
            panelUser.Name        = "Super Admin";
            panelUser.CompanyId   = 1;
            panelUser.Email       = "*****@*****.**";
            panelUser.Password    = "******";
            panelUser.Role        = UserRole.SuperAdmin;
            panelUser.CreatedDate = DateTime.Now;
            panelUserArray1[0]    = panelUser;
            PanelUser[] panelUserArray2 = panelUserArray1;
            modelBuilder.Entity <PanelUser>().HasData(panelUserArray2);
            FeedbackForm feedbackForm1 = new FeedbackForm();

            feedbackForm1.Id          = 1;
            feedbackForm1.CompanyId   = 1;
            feedbackForm1.CreatedDate = DateTime.Now;
            FeedbackForm feedbackForm2 = feedbackForm1;

            modelBuilder.Entity <FeedbackForm>().HasData(new FeedbackForm[1]
            {
                feedbackForm2
            });
        }
Example #18
0
        private async Task MessageReceivedAsync(IDialogContext context, IAwaitable <IMessageActivity> result)
        {
            var message = await result;

            if (message.Value != null)
            {
                // PENDING ITEMS:
                // Validation on adaptive required is requied true property
                // all validations are handled below which should not be the case!
                // Got an Action Submit
                dynamic value      = message.Value;
                string  submitType = value.Type.ToString();
                switch (submitType)
                {
                case "Send Feedback":
                    FeedbackForm query;
                    try
                    {
                        query = FeedbackForm.Parse(value);

                        // Trigger validation using Data Annotations attributes from the HotelsQuery model
                        List <ValidationResult> results = new List <ValidationResult>();
                        bool valid = Validator.TryValidateObject(query, new ValidationContext(query, null, null), results, true);
                        if (!valid)
                        {
                            // Some field in the Feedback Form Query are not valid
                            var errors = string.Join("\n", results.Select(o => " - " + o.ErrorMessage));
                            await context.PostAsync("Please complete all the search parameters:\n" + errors);

                            return;
                        }
                    }
                    catch (InvalidCastException ex)
                    {
                        // Feedback Form Query could not be parsed
                        await context.PostAsync("Please complete all the search parameters");

                        return;
                    }

                    // Proceed with hotels search
                    await context.Forward(new FeedbackDialog(), this.ResumeAfterDialog, message, CancellationToken.None);

                    return;

                    // More cases will go here if the more adaptive card forms are used with Action Submit
                }
            }
            else
            {
                // Send the Message to LuisDialog to handle
                await context.Forward(new RootLuisDialog(), this.ResumeAfterDialog, message, CancellationToken.None);
            }
        }
Example #19
0
        public async Task SendFeedback(FeedbackForm feedback)
        {
            //var response = await ApiHttpClient.Instance.PostAsync("api/v1/feedback",
            //        new StringContent(JsonConvert.SerializeObject(feedback), Encoding.UTF8, "application/json"))
            //    .ConfigureAwait(false);

            //var responseString = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
            //if (response.IsSuccessStatusCode == false)
            //{
            //    throw new InvalidOperationException(responseString);
            //}
        }
 public ActionResult Feedback(FeedbackForm form)
 {
     if (ModelState.IsValid)
     {
         return(View("ThankYou", form));
     }
     else
     {
         ViewBag.Result = "Invalid Entries, Kindly Recheck.";
     }
     return(View());
 }
        private IEnumerator SendBugReportAsync()
        {
            FeedbackFormResult result = new FeedbackFormResult();

            byte[] screenshotData = null;
            bool   isWaiting      = true;

            if (m_screenshotToggle.isOn)
            {
                yield return(StartCoroutine(CaptureScreenshot(data => screenshotData = data)));
            }

            m_loadingBox.Open("Sending bug report...");

            FeedbackForm.FeedbackType = FeedbackTypeValue;
            FeedbackForm.Email        = m_emailField.text;
            FeedbackForm.Subject      = m_subjectField.text;
            FeedbackForm.Feedback     = m_contentField.text;
            FeedbackForm.Screenshot   = screenshotData;
            FeedbackForm.SystemInfo   = PrintSystemInfo();

            FeedbackForm.Send(obj =>
            {
                result    = obj;
                isWaiting = false;
            });

            while (isWaiting)
            {
                yield return(null);
            }

            m_loadingBox.Close();

            if (result.Success)
            {
                ShowDialogBox("Your bug report has been sent! Thank you.",
                              DialogBox.ButtonLayout.OK);

                LastUsedEmail           = m_emailField.text;
                m_subjectField.text     = string.Empty;
                m_contentField.text     = string.Empty;
                m_screenshotToggle.isOn = true;
                m_systemInfoToggle.isOn = true;
            }
            else
            {
                UnityDebug.LogError(result.Error);
                ShowDialogBox("Your bug report could not be sent! Please try again.",
                              DialogBox.ButtonLayout.OK);
            }
        }
Example #22
0
        private async Task FormComplete(IDialogContext context, IAwaitable <FeedbackForm> result)
        {
            FeedbackForm form = null;

            try
            {
                form = await result;

                ClientContext ctx = new ClientContext("https://wbsharepoint.sharepoint.com/sites/POCs/");
                Web           web = ctx.Web;

                string       pwd      = "Welcome2017";
                SecureString passWord = new SecureString();
                foreach (char c in pwd.ToCharArray())
                {
                    passWord.AppendChar(c);
                }
                ctx.Credentials = new SharePointOnlineCredentials("*****@*****.**", passWord);

                List feedbackList = ctx.Web.Lists.GetByTitle("cBOTFeedback");
                ListItemCreationInformation feedbackCreateInfo = new ListItemCreationInformation();
                ListItem feedbackItem;

                feedbackItem = feedbackList.AddItem(feedbackCreateInfo);

                string[] arrCategory = { "Blank", "UX", "Services", "Others" };
                string[] arrRate     = { "Blank", "Horrible", "Bad", "Ok", "Good", "Awesome" };

                feedbackItem["Title"]            = arrCategory[(int)form.CategoryName];
                feedbackItem["WhatLikes"]        = form.Like;
                feedbackItem["WhatNeedsImprove"] = form.Improved;
                feedbackItem["Rating"]           = arrRate[(int)form.Rate];
                feedbackItem.Update();
                ctx.ExecuteQuery();
            }
            catch (OperationCanceledException)
            {
            }

            if (form == null)
            {
                await context.PostAsync("You canceled the form.");
            }
            else
            {
                // Here we could call our signup service to complete the sign-up

                var message = $"We have taken your inputs and Thanks for your valuable feedback.";
                await context.PostAsync(message);
            }
            this.ShowOptions(context);
        }
Example #23
0
 public ActionResult AboutUs(FeedbackForm objFeedback)
 {
     if (ModelState.IsValid)
     {
         // Code here if successful.
         PMT.OfiiceBoy.clsSendMail cls = new OfiiceBoy.clsSendMail();
         cls.SendMail("*****@*****.**", "Name : " + objFeedback.Email + ", Mobile : " + objFeedback.Mobile, objFeedback.Feedback);
         return(Redirect(Url.Content("~/")));
     }
     else
     {
         return(View(objFeedback));
     }
 }
Example #24
0
 private string ReplaceTokens(string messageBody, FeedbackForm form, User user, Person person)
 {
     //get the theme name
     messageBody = messageBody.Replace("$type", form.Type);
     messageBody = messageBody.Replace("$subject", form.Subject);
     messageBody = messageBody.Replace("$comments", form.Comments);
     messageBody = messageBody.Replace("$time", form.Time.ToString());
     messageBody = messageBody.Replace("$theme", form.Theme);
     messageBody = messageBody.Replace("$page", form.Page);
     messageBody = messageBody.Replace("$browser", form.Browser);
     messageBody = messageBody.Replace("$username", user.Name);
     messageBody = messageBody.Replace("$email", person.Email);
     messageBody = messageBody.Replace("$phonenumber", person.PhoneNumber);
     return(messageBody);
 }
Example #25
0
        public static MailInfo CreateMail(FeedbackForm feedback, string htmlTemplate)
        {
            var result = new MailInfo
            {
                Subject    = "Customer feedback",
                IsBodyHtml = true,
                To         = new[] { ConfigManager.ReservationEmail }
            };
            var body = htmlTemplate.Replace("{{name}}", feedback.Name);

            body        = body.Replace("{{email}}", feedback.Email);
            body        = body.Replace("{{message}}", feedback.Message);
            result.Body = body;
            return(result);
        }
Example #26
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            FeedbackForm = await _context.FeedbackForm.FirstOrDefaultAsync(m => m.ID == id);

            if (FeedbackForm == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Example #27
0
        public OkObjectResult SendFeedbackForm([FromBody] FeedbackForm form)
        {
            string emailBody = string.Empty;

            emailBody += "<p>Your overall satisfaction of the app: " + form.SatisfactionLevel + "</p>";
            emailBody += "<p>How satisfied are you with the ability to collaborate with others using this app? " + form.CollabLevel + "</p>";
            emailBody += "<p>What do you like most about the app? " + form.DidWell + "</p>";
            emailBody += "<p>Which of the issues below was the biggest problem during your experience? " + form.Issue + "</p>";
            emailBody += "<p>Please describe the problem you encountered in more detail: " + form.IssueDetails + "</p>";
            emailBody += "<p>Do you have any suggestions for improvement? " + form.Improvement + "</p>";

            SendEmail(emailBody);

            return(Ok(new { response = "Email sent sucessful!" }));
        }
Example #28
0
    private void ShowFeedbackForm()
    {
        GameObject   feedbackFormInstance = Instantiate(WindowResources.Instance.FeedbackForm);
        FeedbackForm feedbackForm         = feedbackFormInstance.GetComponent <FeedbackForm>();

        feedbackForm.OnCloseAction = () =>
        {
            MenuEnabled = true;
        };
        feedbackForm.transform.parent        = transform;
        feedbackForm.transform.rotation      = transform.rotation;
        feedbackForm.transform.localPosition = Vector3.zero;
        feedbackForm.transform.Translate(new Vector3(-0.1f, 0.01f, 0.01f));
        MenuEnabled = false;
    }
Example #29
0
        public FeedbackFormViewModel(FeedbackForm feedbackForm)
        {
            if (feedbackForm != null)
            {
                this.Id                = feedbackForm.Id;
                this.Name              = feedbackForm.Name;
                this.DeadlineDate      = feedbackForm.DeadlineDate;
                this.FeedbackQuestions = new List <FeedbackQuestionViewModel>();

                foreach (FeedbackQuestion fq in feedbackForm.FeedbackQuestions)
                {
                    this.FeedbackQuestions.Add(new FeedbackQuestionViewModel(fq));
                }
            }
        }
Example #30
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         FeedbackForm    cusObj      = new FeedbackForm();
         FeedbackFormDAO cusDao      = new FeedbackFormDAO();
         string          str         = Convert.ToString(Session["FeedBackActive"].ToString());
         string          AdminNumber = Convert.ToString(Session["AdminNo"].ToString());
         cusObj = cusDao.GetFeedbackSelected(str, AdminNumber);
         if (cusObj != null)
         {
             CountryLabel.Text = cusObj.location;
         }
     }
 }