Ejemplo n.º 1
0
        private void DataBind()
        {
            //DataLib.SysVar.strSysCon = "Data Source=.;Initial Catalog=Master;Persist Security Info=True;User ID=" + DataLib.SysVar.strLogID + ";Password="******"true");

            //DataSet ds = myHelper.GetDs("select * from master.dbo.t_JXCAccount");
            gcAccount.DataSource = ds.Tables[0].DefaultView;
            ds.Dispose();
        }
Ejemplo n.º 2
0
        private void BindAccount(string sFlag)
        {
            DataLib.DataHelper myHelper = new DataLib.DataHelper();
            DataSet            ds       = myHelper.GetAccount(sFlag);

            lupAccount.Properties.DataSource    = ds.Tables[0].DefaultView;
            lupAccount.Properties.ValueMember   = "FID";
            lupAccount.Properties.DisplayMember = "FName";

            string strAccount = DataLib.SysVar.IniReadValue("Database", "Account", DataLib.SysVar.iniFile);

            if (lupAccount.Properties.GetDataSourceRowByKeyValue(strAccount) != null)
            {
                if (strAccount.Length > 0)
                {
                    lupAccount.EditValue = strAccount;
                }
            }
        }