Exemplo n.º 1
0
        void btn_Click(object sender, EventArgs e)
        {
            string lang = "CH";

            // 首先安装GPM.
            BP.GPM.Glo.DoInstallDataBase(lang, "Inc");

            //是否要安装demo.
            bool isDemo = this.Pub1.GetRadioButtonByID("RB_DemoOn").Checked;

            if (BP.WF.Glo.OSModel == BP.WF.OSModel.BPM)
            {
                //运行GPM的安装
                BP.GPM.Glo.DoInstallDataBase(lang, "Inc");
            }

            //运行ccflow的安装
            BP.WF.Glo.DoInstallDataBase(lang, isDemo);

            //安装CCIM
            if (this.Pub1.GetRadioButtonByID("RB_CCIM_Y").Checked)
            {
                BP.WF.Glo.DoInstallCCIM();
            }

            //加注释.
            BP.Sys.PubClass.AddComment();

            // 装载演示数据.
            if (this.Pub1.GetRadioButtonByID("RB_DemoOn").Checked)
            {
                BP.Port.Emp emp = new BP.Port.Emp("admin");
                BP.Web.WebUser.SignInOfGener(emp);

                //装载数据模版.
                BP.WF.DTS.LoadTemplete l = new BP.WF.DTS.LoadTemplete();
                string msg = l.Do() as string;
            }

            try
            {
                //增加图片签名
                BP.WF.DTS.GenerSiganture gs = new BP.WF.DTS.GenerSiganture();
                gs.Do();
            }
            catch
            {
            }
            this.Response.Redirect("DBInstall.aspx?DoType=OK", true);
        }
Exemplo n.º 2
0
        void btn_Click(object sender, EventArgs e)
        {
            string lang = "CH";
            string db   = "SQLServer";
            string hj   = "Inc";

            if (this.Pub1.GetRadioButtonByID("RB_SQL").Checked)
            {
                db = "SQLServer";
            }

            if (this.Pub1.GetRadioButtonByID("RB_Oracle").Checked)
            {
                db = "Oracle";
            }

            if (this.Pub1.GetRadioButtonByID("RB_DB2").Checked)
            {
                db = "DB2";
            }

            if (this.Pub1.GetRadioButtonByID("RB_MYSQL").Checked)
            {
                db = "MySQL";
            }

            BP.WF.XML.Langs langs = new BP.WF.XML.Langs();
            langs.RetrieveAll();
            foreach (BP.WF.XML.Lang xml in langs)
            {
                if (this.Pub1.GetRadioButtonByID("RB_" + xml.No).Checked)
                {
                    lang = xml.No;
                }
            }

            if (this.Pub1.GetRadioButtonByID("RB_Inc").Checked)
            {
                hj = "Inc";
            }

            if (this.Pub1.GetRadioButtonByID("RB_Gov").Checked)
            {
                hj = "Gov";
            }

            hj = "Inc";
            //运行。
            BP.WF.Glo.DoInstallDataBase(lang, hj, this.Pub1.GetRadioButtonByID("RB_DemoOn").Checked);

            //加注释.
            BP.PubClass.AddComment();

            // 装载演示数据.
            if (this.Pub1.GetRadioButtonByID("RB_DemoOn").Checked)
            {
                BP.Port.Emp emp = new BP.Port.Emp("admin");
                BP.Web.WebUser.SignInOfGener(emp);
                BP.WF.DTS.LoadTemplete l = new BP.WF.DTS.LoadTemplete();
                string msg = l.Do() as string;
            }

            try
            {
                //增加图片签名
                BP.WF.DTS.GenerSiganture gs = new BP.WF.DTS.GenerSiganture();
                gs.Do();
            }
            catch
            {
            }


            this.Response.Redirect("DBInstall.aspx?DoType=OK", true);
        }