//Hakkımızda Ekleme-Post
 public ActionResult Aboutadd(about about, int type)
 {
     if (online() == false)
     {
         return(RedirectToAction("Login", "Security"));
     }
     try
     {
         string s = "";
         if (type == 1)
         {
             about.aboutType = true;
             s = "Misyon Eklendi";
         }
         else
         {
             about.aboutType = false;
             s = "Vizyon Eklendi";
         }
         db.abouts.Add(about);
         db.SaveChanges();
         var usr = db.abouts.Where(x => x.abouts == about.abouts && x.aboutType == about.aboutType).FirstOrDefault();
         process(usr.aboutId, "About", s);
         return(RedirectToAction("About", "Admin"));
     }
     catch (Exception ex)
     {
         return(RedirectToAction("Error", "Home", new { ex = ex }));
     }
 }
Exemple #2
0
        //none
#else
        void App_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            // Add an About command
            var about = new SettingsCommand("About", "About", (handler) =>
            {
                about flyout = new about();
                flyout.Title = "About";
                flyout.Show();
                //var settings = new SettingsFlyout();
                //settings.Content = new about();
                //settings.HeaderBrush = new SolidColorBrush(_background);
                //settings.Background = new SolidColorBrush(_background);
                //settings.HeaderText = "About";
                //settings.IsOpen = true;
            });

            args.Request.ApplicationCommands.Add(about);

            // add a Privacy and policy command
            var privacy = new SettingsCommand("Privacy Policy", "Privacy Policy", (handler) =>
            {
                var uri = new Uri("//your link of privacy and policy");
                //hena hn7oot el elink ely feh el Privacy policy
                IAsyncOperation <bool> x = Windows.System.Launcher.LaunchUriAsync(uri);
            });

            args.Request.ApplicationCommands.Add(privacy);
        }
Exemple #3
0
        private void aboutUsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            about add = new about();

            add.MdiParent = this;
            add.Visible   = true;
            add.Show();
        }
Exemple #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            about about = new about();

            about.ShowDialog();
            this.Show();
        }
Exemple #5
0
 private void 关于ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (about == null || about.IsDisposed == true)
     {
         about = new about();
     }
     //this.Hide();//隐藏现在这个窗口
     about.Show();//新窗口显现
     about.Activate();
 }
Exemple #6
0
        public ActionResult Edit(about updateAbout)
        {
            var updated = new AboutsModel().updateAboutById(updateAbout.id, updateAbout);

            if (updated)
            {
                return(RedirectToAction("Index", "About"));
            }
            return(View());
        }
        //Hakkımızda Güncelleme-Post
        public ActionResult Aboutupdate(about ab, int type)
        {
            if (online() == false)
            {
                return(RedirectToAction("Login", "Security"));
            }
            var a = db.abouts.FirstOrDefault(x => x.aboutId == ab.aboutId);

            a.abouts = ab.abouts;
            db.SaveChanges();
            process(a.aboutId, "About", "Güncellendi");
            return(RedirectToAction("About", "Admin"));
        }
Exemple #8
0
        public ActionResult Create(about newAbout)
        {
            newAbout.content    = newAbout.content;
            newAbout.start_time = DateTime.Now;
            newAbout.status     = false;
            var created = new AboutsModel().createAbout(newAbout);

            if (created)
            {
                return(RedirectToAction("Index", "About"));
            }
            return(View());
        }
 public ActionResult Edit(about gioithieu)
 {
     if (ModelState.IsValid)
     {
         var dao    = new GioiThieuDao();
         var result = dao.Update(gioithieu);
         if (result)
         {
             return(RedirectToAction("Index", "GioiThieu"));
         }
         else
         {
             ModelState.AddModelError("", "Cập nhật không thành công");
         }
     }
     return(View("Index"));
 }
 public ActionResult Create(about gioithieu) // Tạo tài khoản
 {
     if (ModelState.IsValid)
     {
         var  dao = new GioiThieuDao();
         long id  = dao.Insert(gioithieu);
         if (id > 0)
         {
             return(RedirectToAction("Index", "GioiThieu"));
         }
         else
         {
             ModelState.AddModelError("", "Thêm không thành công");
         }
     }
     return(View("Index"));
 }
Exemple #11
0
 public bool Update(about entity)
 {
     try
     {
         var about = db.abouts.Find(entity.ID);
         //Bổ sung update
         about.Images    = entity.Images;
         about.MetaTitle = entity.MetaTitle;
         about.Mota      = entity.Mota;
         about.Ten       = entity.Ten;
         about.Trangthai = entity.Trangthai;
         db.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
        private void ToolStripMenuItemAbout_Click(object sender, EventArgs e)
        {
            about m_objabout = new about();

            m_objabout.ShowDialog();
        }
Exemple #13
0
        private void aToolStripMenuItem_Click(object sender, EventArgs e)
        {
            about sobre = new about();

            sobre.Show();
        }
Exemple #14
0
 public long Insert(about entity)
 {
     db.abouts.Add(entity);
     db.SaveChanges();
     return(entity.ID);
 }
Exemple #15
0
        /*
         * MENU ITEMS
         */
        private void menuItem_about(object sender, RoutedEventArgs e)
        {
            about aboutWin = new about();

            aboutWin.Show();
        }
Exemple #16
0
 private void toolstrip_about_click(object o, EventArgs e)
 {
     using (about about = new about())
         about.ShowDialog();
 }
        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            about about_win = new about();

            about_win.ShowDialog();
        }
Exemple #18
0
 private void pictureBox8_Click(object sender, EventArgs e)
 {
     panel2.Location = new Point(0, -50);
     form3           = new about();
     form3.ShowDialog();
 }
Exemple #19
0
        private void button3_Click(object sender, EventArgs e)
        {
            Form about = new about();

            about.Show();
        }
Exemple #20
0
        private void button1_Click(object sender, EventArgs e)
        {
            about ab = new about();

            ab.Show();
        }
Exemple #21
0
    void about(object sender, EventArgs e)
    {
        about frm = new about();

        frm.ShowDialog(this);
    }
Exemple #22
0
        private void button1_Click(object sender, EventArgs e)
        {
            about frm = new about();

            frm.ShowDialog();
        }
Exemple #23
0
        //四、帮助
        private void 帮助ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            about about = new about();

            about.Show();
        }