Beispiel #1
0
 public PageSend(Flip flip)
 {
     feed = new FeedBackRepository();
     InitializeComponent();
     //DisableWPFTabletSupport();
     _flip = flip;
 }
Beispiel #2
0
        public JournalsPage(Flip flip)
        {
            f = new FeedBackRepository();

            _flip   = flip;
            Loaded += OnLoad;
            InitializeComponent();

            myBook.ItemsSource = _p1Collection;
        }
Beispiel #3
0
 public void PostDeleteMethod(int id)
 {
     using (var parepo = new FeedBackRepository())
     {
         if (id != 0)
         {
             FeedBack _patient = parepo.GetById(id);
             parepo.Delete(_patient);
         }
     }
 }
Beispiel #4
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            bool          f1 = false, f2 = false, f3 = false, f4 = false;
            List <string> questions = new List <string>();;

            if (r1.IsChecked == true)
            {
                f1 = true;
                questions.Add(r1.Content.ToString());
            }
            if (r2.IsChecked == true)
            {
                f2 = true;
                questions.Add(r2.Content.ToString());
            }
            if (r3.IsChecked == true)
            {
                f3 = true;
                questions.Add(r3.Content.ToString());
            }
            if (r4.IsChecked == true)
            {
                f4 = true;
                questions.Add(r4.Content.ToString());
            }


            //if (!string.IsNullOrEmpty(texbox_question.Text))
            //{
            //    questions.Add(texbox_question.Text);
            //}
            //if (questions.Count==0 || string.IsNullOrEmpty(combobox_business.Text) || string.IsNullOrEmpty(combobox_country.Text) || string.IsNullOrEmpty(combobox_you_are.Text) || (string.IsNullOrEmpty(texbox_question.Text) && !f1 && !f2 && !f3 && !f4))
            //{
            //    MessageBox.Show(Properties.Resources.warning);
            //    return;
            //}

            string q = Properties.Resources.Your_q + ":";

            foreach (var item in questions)
            {
                q += item + Environment.NewLine;
            }

            string             str = Properties.Resources.You_are + ":" + combobox_you_are.Text + Environment.NewLine + Properties.Resources.Your_country + ":" + combobox_country.Text + Environment.NewLine + Properties.Resources.Your_business_sector + ":" + combobox_business.Text + Environment.NewLine + q;//combobox_business.Text + " " + combobox_country.Text + " " + combobox_you_are.Text + " " + texbox_question.Text;
            FeedBackRepository f   = new FeedBackRepository();

            f.SendMessage(str);
            flip.showJournalsPage();
        }
Beispiel #5
0
 public List <FeedBackViewModel> GetAll()
 {
     using (var obj = new FeedBackRepository())
     {
         return(obj.GetAll().
                Select(x => new FeedBackViewModel()
         {
             PatientId = x.PatientId,
             Name = x.Name,
             Email = x.Email,
             Comment = x.Comment,
             Votes = x.Votes
         }).ToList());
     }
 }
Beispiel #6
0
 public void CreateMethod(FeedBackViewModel model, string feedback)
 {
     using (var obj = new FeedBackRepository())
         if (model.PatientId == 0)
         {
             FeedBack _fd = new FeedBack
             {
                 PatientId = model.PatientId,
                 Name      = model.Name,
                 Email     = model.Email,
                 Comment   = model.Comment,
                 Votes     = feedback
             };
             obj.Insert(_fd);
         }
 }
Beispiel #7
0
        public FeedBackViewModel GetById(int?id)
        {
            FeedBackViewModel dr = new FeedBackViewModel();

            using (var obj = new FeedBackRepository())
            {
                if (id != null)
                {
                    var _obj = obj.GetById(id.Value);

                    dr.PatientId = _obj.PatientId;
                }

                return(dr);
            }
        }
Beispiel #8
0
        public FeedBackViewModel DetailsMethod(int?id)
        {
            FeedBackViewModel dr = new FeedBackViewModel();

            using (var fd = new FeedBackRepository())
            {
                if (id.HasValue && id != 0)
                {
                    FeedBack _fb = fd.GetById(id.Value);

                    dr.PatientId = _fb.PatientId;
                    dr.Name      = _fb.Name;
                    dr.Email     = _fb.Email;
                    dr.Comment   = _fb.Comment;
                }
                return(dr);
            }
        }
Beispiel #9
0
        public FeedBackViewModel GetDeleteMethod(int id)
        {
            FeedBackViewModel rm = new FeedBackViewModel();

            using (var parepo = new FeedBackRepository())
            {
                if (id != 0)
                {
                    FeedBack _patient = parepo.GetById(id);

                    rm.PatientId = _patient.PatientId;
                    rm.Name      = _patient.Name;
                    rm.Email     = _patient.Email;
                    rm.Comment   = _patient.Comment;
                }

                return(rm);
            }
        }
Beispiel #10
0
 public FeedBackService(FeedBackRepository repo)
     : base(repo)
 {
 }
 public FeedBackService(FeedBackRepository repo, IServiceProvider serviceProvider)
     : base(repo, serviceProvider)
 {
 }
Beispiel #12
0
 public QuestionService(FeedBackRepository repository, IAnswerService answerService)
 {
     _repository    = repository;
     _answerService = answerService;
 }
 public FeedBackBusiness()
 {
     _feedBackRepository = new FeedBackRepository();
 }
 public FeedBackBusiness(FeedBackRepository feedBackRepository)
 {
     _feedBackRepository = feedBackRepository;
 }