Exemple #1
0
 public DbToWeb(string longservername)
 {
     InitializeComponent();
     this.dbset = DbConfig.GetSetting(longservername);
     this.dbobj = DBOMaker.CreateDbObj(this.dbset.DbType);
     this.dbobj.DbConnectStr = this.dbset.ConnectStr;
     this.lblServer.Text     = this.dbset.Server;
 }
Exemple #2
0
        public static IDbObject CreatDbObj(string longservername)
        {
            DbSettings setting  = DbConfig.GetSetting(longservername);
            IDbObject  dbObject = DBOMaker.CreateDbObj(setting.DbType);

            dbObject.DbConnectStr = setting.ConnectStr;
            return(dbObject);
        }
Exemple #3
0
        public static IDbScriptBuilder CreatDsb(string longservername)
        {
            DbSettings       setting         = DbConfig.GetSetting(longservername);
            IDbScriptBuilder dbScriptBuilder = DBOMaker.CreateScript(setting.DbType);

            dbScriptBuilder.DbConnectStr = setting.ConnectStr;
            return(dbScriptBuilder);
        }
Exemple #4
0
 private void SetFormConfig(string servername)
 {
     this.dbset              = DbConfig.GetSetting(servername);
     this.txtNameSpace.Text  = this.dbset.Namepace;
     this.txtNameSpace2.Text = this.dbset.Folder;
     this.cm_daltype         = new DALTypeAddIn("Maticsoft.IBuilder.IBuilderDALMTran");
     this.cm_daltype.Title   = "DAL";
     this.groupBox3.Controls.Add(this.cm_daltype);
     this.cm_daltype.Location = new Point(30, 70);
     this.cm_daltype.SetSelectedDALType(this.dbset.DALType.Trim());
     this.tabControl1.SelectedIndex = 0;
 }
Exemple #5
0
 public SearchTables(MainForm mdiParentForm, string longservername)
 {
     InitializeComponent();
     this.mainfrm            = mdiParentForm;
     this.longServername     = longservername;
     this.dbset              = DbConfig.GetSetting(longservername);
     this.dbobj              = DBOMaker.CreateDbObj(this.dbset.DbType);
     this.dbobj.DbConnectStr = this.dbset.ConnectStr;
     this.lblServer.Text     = this.dbset.Server;
     this.CreatListView();
     this.WorkLoad();
     this.cmboxType.SelectedIndex = 0;
 }
Exemple #6
0
 public TemplateBatch(string longservername, bool isproc)
 {
     InitializeComponent();
     this.dbset = DbConfig.GetSetting(longservername);
     this.dbobj = DBOMaker.CreateDbObj(this.dbset.DbType);
     this.dbobj.DbConnectStr = this.dbset.ConnectStr;
     this.lblServer.Text     = this.dbset.Server;
     this.txtFolder.Text     = this.dbset.Folder;
     this.isProc             = isproc;
     if (this.isProc)
     {
         this.groupBox2.Text = "选择存储过程";
     }
 }
Exemple #7
0
        public void SetListView(DbView dbviewfrm)
        {
            #region 得到类型对象
            TreeNode selectedNode = dbviewfrm.treeView1.SelectedNode;
            if (selectedNode == null)
            {
                return;
            }
            this.objtype = selectedNode.Tag.ToString();
            string a;
            if ((a = selectedNode.Tag.ToString()) != null)
            {
                if (a == "table" || a == "view")
                {
                    this.servername = selectedNode.Parent.Parent.Parent.Text;
                    this.dbname     = selectedNode.Parent.Parent.Text;
                    this.tablename  = selectedNode.Text;
                    this.dbobj      = ObjHelper.CreatDbObj(this.servername);
                    this.BindlistViewCol(this.dbname, this.tablename);
                    goto IL_1B7;
                }
                if (a == "column")
                {
                    this.servername = selectedNode.Parent.Parent.Parent.Parent.Text;
                    this.dbname     = selectedNode.Parent.Parent.Parent.Text;
                    this.tablename  = selectedNode.Parent.Text;
                    this.dbobj      = ObjHelper.CreatDbObj(this.servername);
                    this.BindlistViewCol(this.dbname, this.tablename);
                    goto IL_1B7;
                }
                if (a == "proc")
                {
                    this.servername = selectedNode.Parent.Parent.Parent.Text;
                    this.dbname     = selectedNode.Parent.Parent.Text;
                    this.tablename  = selectedNode.Text;
                    this.dbobj      = ObjHelper.CreatDbObj(this.servername);
                    this.BindlistProcCol(this.dbname, this.tablename);
                    goto IL_1B7;
                }
            }
            this.listView1.Items.Clear();
IL_1B7:
            this.GetTableDesc();
            if (this.servername != null && this.servername.Length > 1)
            {
                this.dbset = DbConfig.GetSetting(this.servername);
            }
            #endregion
        }
Exemple #8
0
        private void SetFormConfig(string servername)
        {
            if (servername == null || servername.Length == 0)
            {
                return;
            }
            this.setting             = DbConfig.GetSetting(servername);
            this.txtProjectName.Text = this.setting.ProjectName;
            this.txtNameSpace.Text   = this.setting.Namepace;
            this.txtNameSpace2.Text  = this.setting.Folder;
            this.txtProcPrefix.Text  = this.setting.ProcPrefix;
            string a;

            if ((a = this.setting.AppFrame.ToLower()) != null)
            {
                if (!(a == "one"))
                {
                    if (!(a == "s3"))
                    {
                        if (a == "f3")
                        {
                            this.radbtn_Frame_F3.Checked = true;
                        }
                    }
                    else
                    {
                        this.radbtn_Frame_S3.Checked = true;
                    }
                }
                else
                {
                    this.radbtn_Frame_One.Checked = true;
                }
            }
            this.radbtn_Type_Click(null, null);
            this.radbtn_Frame_Click(null, null);
            this.radbtn_F3_Click(null, null);
            this.cm_daltype.SetSelectedDALType(this.setting.DALType.Trim());
            this.cm_blltype.SetSelectedDALType(this.setting.BLLType.Trim());
            this.cm_webtype.SetSelectedDALType(this.setting.WebType.Trim());
        }