Example #1
0
        private void FrmLogin_Load(object sender, EventArgs e)
        {
            FormFactory dbhelp = new FormFactory();

            if (!dbhelp.ConnectionResult("value", "Granity.granityMgr", "select * from 用户信息表"))
            {
                FrmDBDatabase db = new FrmDBDatabase();
                db.ShowDialog();
                if (!db.Success)
                {
                    return;
                }
            }
            try
            {
                //读取业务单元和传递参数
                this.paramwin = BindManager.getSystemParam();
                NameObjectList pstrans = BindManager.getTransParam();
                ParamManager.MergeParam(this.paramwin, pstrans);
                unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName);
                //绑定数据
                BindManager bg = new BindManager(this);
                this.dsUnit = bg.BuildDataset(this.unitItem, this.paramwin);
                this.Query  = new QueryDataRes(this.unitItem.DataSrcFile);
                bg.BindFld(this, this.dsUnit);
                setSystemTime();
            }
            catch
            {
                this.Close();
            }
        }
Example #2
0
        private void FrmLogin_Load(object sender, EventArgs e)
        {
            FormFactory dbhelp = new FormFactory();

            if (!dbhelp.ConnectionResult("value", "Granity.granityMgr", "select * from �û���Ϣ��"))
            {

                FrmDBDatabase db = new FrmDBDatabase();
                db.ShowDialog();
                if (!db.Success)
                    return;
            }
            try
            {

                //��ȡҵ��Ԫ�ʹ��ݲ���
                this.paramwin = BindManager.getSystemParam();
                NameObjectList pstrans = BindManager.getTransParam();
                ParamManager.MergeParam(this.paramwin, pstrans);
                unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName);
                //������
                BindManager bg = new BindManager(this);
                this.dsUnit = bg.BuildDataset(this.unitItem, this.paramwin);
                this.Query = new QueryDataRes(this.unitItem.DataSrcFile);
                bg.BindFld(this, this.dsUnit);
                setSystemTime();
            }
            catch
            {
                this.Close();

            }
        }