예제 #1
0
 public ActionResult UpdateAboutUS(AboutUS au)
 {
     if (Session["UserLogin"] == null)
     {
         return(RedirectToAction("Login"));
     }
     iAboutDal.EditEntity(au);
     return(RedirectToAction("ShowAboutUS"));
 }
예제 #2
0
        public ActionResult UpdateAboutUS(int id)
        {
            if (Session["UserLogin"] == null)
            {
                return(RedirectToAction("Login"));
            }
            AboutUS ab = iAboutDal.LoadEntity(a => a.AboutID == id).FirstOrDefault();

            return(View(ab));
        }
 public void BackMenuAU()
 {
     MenuPrin.SetActive(true);
     AboutUS.SetActive(false);
 }
 public void AboutUs()
 {
     MenuPrin.SetActive(false);
     AboutUS.SetActive(true);
 }
예제 #5
0
        /// <summary>
        /// 给网站添加默认的演示数据
        /// </summary>
        /// <param name="homeCor"></param>
        /// <param name="image"></param>
        /// <returns></returns>
        public ActionResult AddDefaultDemoData()
        {
            HomeCor        boolHomeCor = iHomeDal.LoadEntity(h => true).FirstOrDefault();
            Employee       boolEmp     = iEmpDal.LoadEntity(e => true).FirstOrDefault();
            SubpageProduct boolProduct = iSubDal.LoadEntity(e => true).FirstOrDefault();

            if (boolHomeCor != null && boolEmp != null && boolProduct != null)
            {
                return(Content("<script >alert('网站默认演示数据已经存在,请不要重复添加!');history.go(-1);</script >", "text/html"));
            }
            HomeCor homeCorDemo = new HomeCor();

            homeCorDemo.IndexTitle       = "首页标题 - 基于Asp.Net 三层架构官网";
            homeCorDemo.Companylogo      = "/Content/Second/images/logo.png";
            homeCorDemo.CompanyCulture   = "——合作,团结 · 发展,交流,共赢——轻改变·大体验";
            homeCorDemo.CompanyAddress   = "广西柳州职业技术学院图书馆";
            homeCorDemo.CompanyRoute     = "火车站乘坐快9、12路等均可抵达";
            homeCorDemo.Telephone        = "07716666666";
            homeCorDemo.Email            = "*****@*****.**";
            homeCorDemo.CompanyCopyright = "基于Asp.Net 三层架构官网";
            iHomeDal.AddEntity(homeCorDemo);

            AboutUS aboutUs = new AboutUS();

            aboutUs.AboutTitle      = "基于Asp.Net 三层架构官网 - 柳州职业技术学院";
            aboutUs.AboutContent    = "基于Asp.Net 三层架构官网由柳州职业技术学院电子信息工程学院软件技术2班学生Evan同学开发, 于2016年11月是以Web前端为导向,以学习资源为依托,以合作为基本工作形式,以效益最大化和服务于全盟经济社会发展为根本目的,集没有投资、没有融资、 没有资产管理、没有资本运营、只有学习资源和项目开发于一体的综合型平台。个人经过一个月的实践探索,加强监管力度……";
            aboutUs.AboutUsMoreLink = "http://www.925i.cn/AboutUsMore";
            iAboutDal.AddEntity(aboutUs);

            for (int i = 1; i < 7; i++)
            {
                Employee employeeDemo = new Employee();
                employeeDemo.EmpoloyeeName = "我是员工姓名" + i.ToString();
                employeeDemo.EmpoloyeePost = "我是员工岗位" + i.ToString();
                if (i >= 4)
                {
                    employeeDemo.EmpoloyeePhoto = "/Content/Second/images/ICON/default5.png";
                }
                else
                {
                    employeeDemo.EmpoloyeePhoto = "/Content/Second/images/ICON/default" + i + ".png";
                }

                employeeDemo.EmpoloyeeInfo = "这里显示的是员工的简介(演示)" + i.ToString();
                iEmpDal.AddEntity(employeeDemo);
            }
            for (int i = 1; i < 4; i++)
            {
                SubpageProduct subProutDemo = new SubpageProduct();
                for (int j = 1; j < 7; j++)
                {
                    if (i == 1)
                    {
                        subProutDemo.ProductName      = "电脑产品名称" + j.ToString();
                        subProutDemo.ProductInfo      = "电脑产品信息(演示)" + j.ToString();
                        subProutDemo.ProductPhotoFile = "/Content/Second/images/Icon/PcSoftware" + j + ".png";
                        subProutDemo.ProductTime      = DateTime.Now;
                        subProutDemo.ClassID          = i;
                        if (j < 3)
                        {
                            subProutDemo.Features = 1;
                        }
                        else
                        {
                            subProutDemo.Features = 0;
                        }
                        subProutDemo.PcDownLink  = "http://www.925i.cn/downlod/" + j + ".zip";
                        subProutDemo.ardDownLink = "#";
                        subProutDemo.iosDownLink = "#";
                        subProutDemo.BuyLink     = "http://www.925i.cn/buy/" + j + ".html";
                        iSubDal.AddEntity(subProutDemo);
                    }
                    else if (i == 2)
                    {
                        subProutDemo.ProductName      = "手机产品名称" + j.ToString();
                        subProutDemo.ProductInfo      = "手机产品信息(演示)" + j.ToString();
                        subProutDemo.ProductPhotoFile = "/Content/Second/images/Icon/PhoneSoftware" + j + ".png";
                        subProutDemo.ProductTime      = DateTime.Now;
                        subProutDemo.ClassID          = i;
                        if (j < 3)
                        {
                            subProutDemo.Features = 1;
                        }
                        else
                        {
                            subProutDemo.Features = 0;
                        }
                        subProutDemo.PcDownLink  = "http://www.925i.cn/downlod/" + j + ".zip";
                        subProutDemo.ardDownLink = "http://www.925i.cn/downlod/" + j + ".apk";
                        subProutDemo.iosDownLink = "http://www.925i.cn/downlod/" + j + ".ipa";
                        subProutDemo.BuyLink     = "http://www.925i.cn/buy/" + j + ".html";
                        iSubDal.AddEntity(subProutDemo);
                    }

                    else if (i == 3)
                    {
                        subProutDemo.ProductName      = "科技商品名称" + j.ToString();
                        subProutDemo.ProductInfo      = "科技商品信息(演示)" + j.ToString();
                        subProutDemo.ProductPhotoFile = "/Content/Second/images/Icon/productDemo" + j + ".gif";
                        subProutDemo.ProductTime      = DateTime.Now;
                        subProutDemo.ClassID          = i;
                        if (j < 3)
                        {
                            subProutDemo.Features = 1;
                        }
                        else
                        {
                            subProutDemo.Features = 0;
                        }
                        subProutDemo.PcDownLink  = "http://www.925i.cn/downlod/" + j + ".zip";
                        subProutDemo.ardDownLink = "http://www.925i.cn/downlod/" + j + ".apk";
                        subProutDemo.iosDownLink = "http://www.925i.cn/downlod/" + j + ".ipa";
                        subProutDemo.BuyLink     = "http://www.925i.cn/buy/" + j + ".html";
                        iSubDal.AddEntity(subProutDemo);
                    }
                }
            }

            return(Content("<script >alert('网站默认演示数据添加成功,现在去登录后台进行管理吧!');window.location.href = 'Login';</script >", "text/html"));
        }
예제 #6
0
파일: frmMDI.cs 프로젝트: tvvuong274/CNPM14
        private void barButtonItem8_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            AboutUS frm = new AboutUS();

            frm.Show();
        }