Esempio n. 1
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            User user = new User();

            user.Name     = txtUserName.Text;
            user.Mail     = txtMail.Text;
            user.Password = txtPassword.Text;
            user.Role     = cmbboxRole.Text;
            NewsletterDB db = new NewsletterDB();

            db.User.Add(user);

            db.SaveChanges();
            MessageBox.Show("Kullanıcı sisteme kaydedildi.");
            this.NavigationService.Navigate(new GovernerSitesPage());
        }
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            Link link = new Link();

            link.SiteLink        = txtlink.Text;
            link.NewsType        = cmbBoxNewsLinkType.Text;
            link.NewsDate        = dateLink.SelectedDate.Value;
            link.NewsTitle       = txttitle.Text;
            link.NewsDescription = txtdesc.Text;
            link.NewsContent     = txtcontent.Text;

            NewsletterDB db = new NewsletterDB();

            db.Link.Add(link);

            db.SaveChanges();
            MessageBox.Show("Link sisteme kaydedildi.");
            this.NavigationService.Navigate(new SiteDetail_Settings());
        }
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            Website website = new Website();

            website.SiteName    = txtSiteName.Text;
            website.SiteAdress  = txtWebSite.Text;
            website.SiteCode    = txtSiteCode.Text;
            website.SiteType    = cmbboxSiteType.Text;
            website.SiteState   = txtSiteCountry.Text;
            website.SiteCountry = txtSiteState.Text;

            NewsletterDB db = new NewsletterDB();

            db.Website.Add(website);

            db.SaveChanges();
            MessageBox.Show("Gazete sisteme kaydedildi.");
            this.NavigationService.Navigate(new GovernerSitesPage());
        }