private void FrmDepart_Load(object sender, EventArgs e) { //读取业务单元和传递参数 this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); unitName = pstrans["name"].ToString();//单元 //获取当前单元名称 Dictionary <string, string> dict = new Dictionary <string, string>(); dict.Add("组织机构管理", "@db=组织机构"); //数据源 string datasource = dict[this.unitName]; NameObjectList ps = new NameObjectList(); ParamManager.MergeParam(ps, this.paramwin); ps["UnitCode"] = "10"; unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 BindManager bg = new BindManager(this); dsUnit = bg.BuildDataset(this.unitItem, ps); bg.BindFld(this, dsUnit); //对树的操作 bg.BindTrv(this.trvDept, this.dsUnit.Tables["组织机构"], "名称", "ID", "PID", "@名称={名称},@代码={代码},@序号={序号},@ParentCode={ParentCode},@独立管理={独立管理},@分类={分类},@性质={性质},@部门主管={部门主管},@部门职责={部门职责},@班次代码={班次代码},@班次名称={班次名称},@周一={周},@周二={周二},@周三={周三},@周四={周四},@周五={周五},@周六={周六},@周日={周日},@level={level}"); this.trvDept.ExpandAll(); }
private void FrmFeePara_Load(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.deviceName)) { //读取业务单元和传递参数 this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); unitName = pstrans["name"].ToString();//单元 unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 BindManager bg = new BindManager(this); this.dsUnit = bg.BuildDataset(this.unitItem, this.paramwin); bg.BindFld(this, this.dsUnit); if (unitName == "停车场收费标准") { lbDeviceInfo.Visible = false; this.DownBtn.Visible = false; QueryBtn.Visible = false; BtnClose.Visible = false; } } else { this.cbodev.Visible = false; this.btnsave.Visible = false; this.lbDeviceInfo.Text = " " + this.deviceName + "(" + this.deviceID + ")"; } }
private void FrmCardUpdate_Load(object sender, EventArgs e) { //读取业务单元和传递参数 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); bg.BindFld(this, this.dsUnit); this.Query = new QueryDataRes(this.unitItem.DataSrcFile); bg.SetGridCols(this.dbUser, "姓名,卡号,部门名称"); DataTable tab = initDev(); if (null == tab || tab.Rows.Count < 1) { XtraMessageBox.Show("请设置发行器", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } ShowType(); this.cboDTime.Text = DateTime.Now.ToString("yyyy-MM-dd"); this.cboETime.Text = DateTime.Now.ToString("yyyy-MM-dd");; this.cboPTime.Text = DateTime.Now.ToString("yyyy-MM-dd");; }
/// <summary> /// 加载控制参数 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DownComBtn_Click(object sender, EventArgs e) { int[] indexlist = this.getCheckedList(); if (indexlist.Length < 1) { MessageBox.Show("请选择一个设备", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } DataTable tab = this.dbGrid.DataSource as DataTable; DataRow drtarget = tab.Rows[indexlist[0]]; UnitItem unitPark = new UnitItem(DataAccRes.AppSettings("WorkConfig"), "设备控制维护"); BindManager bg = new BindManager(this); NameObjectList ps = new NameObjectList(); ps["code"] = drtarget["编号"]; DataSet ds = bg.BuildDataset(unitPark, ps); FrmCommPara win = new FrmCommPara(); win.DataSource = ds; win.Query = new QueryDataRes(unitPark.DataSrcFile); win.Position = 0; win.Target = this.getTarget(drtarget); win.FunType = "通讯"; win.ShowDialog(this); }
private void FrmDevSet_Load(object sender, EventArgs e) { //初始化参数和单元 this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); this.unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 BindManager bg = new BindManager(this); this.dsUnit = bg.BuildDataset(this.unitItem, this.paramwin); bg.BindFld(this, this.dsUnit); //加载串口 string[] Com = { "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "COM10" }; LoadComBox("串口", Com); //加载波特率 string[] BTL = { "4800", "9600", "19200", "38400", "56000" }; LoadComBox("波特率", BTL); //加载数据位 string[] DataW = { "5", "6", "7", "8" }; LoadComBox("数据位", DataW); //加载停止位 string[] DopW = { "1", "2" }; LoadComBox("停止位", DopW); }
private void FrmDownTime_Load(object sender, EventArgs e) { //初始化参数和单元 this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); this.unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), "时段设置"); this.Text = this.unitItem.UnitName; //绑定数据 BindManager bg = new BindManager(this); this.dsUnit = bg.BuildDataset(this.unitItem, this.paramwin); if (this.dsUnit.Tables.Contains("时段设置")) { DataTable tab = this.dsUnit.Tables["时段设置"]; if (tab.Columns.Contains("选择")) { tab.Columns.Remove("选择"); } tab.Columns.Add("选择", typeof(bool)); } bg.BindFld(this, this.dsUnit); //显示指定字段 //string cols = "选择 40,timeid 编号 40,timename 时段名称 90,timesec1s 起始时间1 90,timesec1e 截止时间1 90,timesec2s 起始时间2 90,timesec2e 截止时间2 90,"; //cols += "date1 起始日期 80,date2 截止日期 80,satrest 星期六 50,sunrest 星期天 50"; //bg.SetGridCols(this.gdValList, cols); foreach (DataGridViewColumn c in this.gdValList.Columns) { c.ReadOnly = !("选择" == c.Name); } this.lbDeviceInfo.Text = " " + this.deviceName + "(" + this.deviceID + ")"; }
private void FormUpDownWork_Load(object sender, EventArgs e) { //初始化参数和单元 this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); this.unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 BindManager bg = new BindManager(this); this.dsUnit = bg.BuildDataset(this.unitItem, this.paramwin); bg.BindFld(this, this.dsUnit); DataTable tab = this.dsUnit.Tables["接班人员"]; if (null == tab || tab.Rows.Count < 1) { return; } DataTable tabUser = this.dsUnit.Tables["用户信息"]; foreach (DataRow dr in tabUser.Rows) { this.ccbNextUser.Items.Add(Convert.ToString(dr["帐号"])); } tbUserName.Text = BindManager.getUser().UserAccounts; }
private void BtQuery_Click(object sender, EventArgs e) { if (this.dateStart.Text == string.Empty) { XtraMessageBox.Show("请输入开始时间", "系统提示!"); return; } if (this.dateEnd.Text == string.Empty) { XtraMessageBox.Show("请输入结束时间", "系统提示!"); return; } NameObjectList pstrans = new NameObjectList(); ParamManager.MergeParam(pstrans, this.paramwin); pstrans["StartDate"] = this.dateStart.EditValue.ToString(); pstrans["EndDate"] = this.dateEnd.EditValue.ToString(); pstrans["Dept"] = this.lookDept.EditValue; pstrans["EmployNO"] = (object)this.txtEmployName.Text; //查询数据 QueryDataRes query = new QueryDataRes(this.unitItem.DataSrcFile); BindManager bg = new BindManager(this); ds = bg.BuildDataset(this.unitItem, pstrans); Granity.granityMgr.Report.viwReports View = new Granity.granityMgr.Report.viwReports(); View.ReportName = "考勤明细查询"; View.ds = ds; View.StartTime = this.dateStart.Text.Trim(); View.EndTime = this.dateEnd.Text.Trim(); View.Activate(); View.Dock = DockStyle.Fill; this.groReport.Controls.Clear(); this.groReport.Controls.Add(View); }
/// <summary> /// 条件查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtQuery_Click(object sender, EventArgs e) { if (this.dateStart.Text == string.Empty) { XtraMessageBox.Show("请输入开始时间", "系统提示!"); return; } if (this.dateEnd.Text == string.Empty) { XtraMessageBox.Show("请输入结束时间", "系统提示!"); return; } NameObjectList pstrans = new NameObjectList(); ParamManager.MergeParam(pstrans, this.paramwin); pstrans["StartTime"] = this.dateStart.EditValue.ToString(); pstrans["EndTime"] = this.dateEnd.EditValue.ToString(); pstrans["CardType"] = this.CbCardtype.EditValue != null?this.CbCardtype.EditValue.ToString() : string.Empty; pstrans["CarNo"] = this.TxtCarNo.Text.Trim(); pstrans["UsrNo"] = this.txtuserID.Text.Trim(); pstrans["Name"] = this.txtuserName.Text.Trim(); pstrans["CardNo"] = this.TxtCardNo.Text.Trim(); //查询数据 QueryDataRes query = new QueryDataRes(this.unitItem.DataSrcFile); BindManager bg = new BindManager(this); DataSet ds = bg.BuildDataset(this.unitItem, pstrans); bg.BindFld(this, ds); }
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(); } }
private void FrmDeptRest_Load(object sender, EventArgs e) { //初始化参数和单元 this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); this.unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 BindManager bg = new BindManager(this); this.dsUnit = bg.BuildDataset(this.unitItem, this.paramwin); bg.BindFld(this, this.dsUnit); }
private void FrmCarStallSet_Load(object sender, EventArgs e) { this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); unitName = pstrans["name"].ToString();//单元 this.Text = unitName; //获取当前单元名称 Dictionary <string, string> dict = new Dictionary <string, string>(); dict.Add("车位组设置", "@db=车位组设置"); dict.Add("时段设置", "@db=时段设置"); if (unitName == "车位组设置") { panel3.Visible = false; this.panel4.Dock = System.Windows.Forms.DockStyle.Top; this.panel5.Dock = System.Windows.Forms.DockStyle.Top; } else if (unitName == "时段设置") { panel4.Visible = false; this.panel3.Dock = System.Windows.Forms.DockStyle.Top; this.panel5.Dock = System.Windows.Forms.DockStyle.Top; } //数据源 string datasource = dict[this.unitName]; this.dbGrid.Tag = datasource; unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 BindManager bg = new BindManager(this); ds = bg.BuildDataset(this.unitItem, this.paramwin); bg.BindFld(this, ds); //列名显示 if (datasource == "@db=车位组设置") { string cols = "车组编号 100,名称 301, 数量 150, 备注 205"; bg.SetGridCols(this.dbGrid, cols); } if (datasource == "@db=时段设置") { string cols = "时段编号 80,时段名称 85, 开始时间1 85,截止时间1 85,开始时间2 85,截止时间2 85,"; cols += "开始日期 83,截止日期 83,星期六 50,星期日 50"; bg.SetGridCols(this.dbGrid, cols); } }
private void FrmOper_Load(object sender, EventArgs e) { //读取业务单元和传递参数 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); bg.BindFld(this, this.dsUnit); LoadOper(cboEndEmp); LoadOper(cboStartEmp); }
private void FrmAddMoney_Load(object sender, EventArgs e) { //读取业务单元和传递参数 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); bg.BindFld(this, this.dsUnit); this.Query = new QueryDataRes(this.unitItem.DataSrcFile); LoadDept(); }
private void FrmSysUsers_Load(object sender, EventArgs e) { //初始化参数和单元 this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); this.unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 BindManager bg = new BindManager(this); this.dsUnit = bg.BuildDataset(this.unitItem, this.paramwin); DataTable tab = dsUnit.Tables["新单位树全集"]; XunFan(tab); }
/// <summary> /// 年月日统计 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtQuery_Click(object sender, EventArgs e) { if (this.dateStart.Text == string.Empty) { XtraMessageBox.Show("请输入开始时间", "系统提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (this.cboDoorName.Text == string.Empty) { XtraMessageBox.Show("请选择操作员", "系统提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (this.lookDate.EditValue == null) { XtraMessageBox.Show("请选择表报", "系统提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } NameObjectList pstrans = new NameObjectList(); ParamManager.MergeParam(pstrans, this.paramwin); pstrans["dt"] = this.dateStart.EditValue.ToString(); pstrans["type"] = this.lookDate.EditValue.ToString(); pstrans["UserName"] = Convert.ToString(this.cboDoorName.Text); //查询数据 QueryDataRes query = new QueryDataRes(this.unitItem.DataSrcFile); BindManager bg = new BindManager(this); ds = bg.BuildDataset(this.unitItem, pstrans); //if (ds.Tables["收费员收费统计"].Rows.Count < 1 || ds.Tables["收费员收费统计"] == null) //{ // XtraMessageBox.Show("没有数据!", "系统提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning); // this.groReport.Controls.Clear(); // return; //} Granity.granityMgr.Report.viwReports View = new Granity.granityMgr.Report.viwReports(); View.ReportName = "收费员收费统计"; View.ds = ds; View.StartTime = this.dateStart.Text.Trim(); View.EndTime = ""; View.Activate(); View.Dock = DockStyle.Fill; this.groReport.Controls.Clear(); this.groReport.Controls.Add(View); }
private void FrmEmployeeRegister_Load(object sender, EventArgs e) { //初始化参数和单元 this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); this.unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 bindMgr = new BindManager(this); this.ds = bindMgr.BuildDataset(this.unitItem, this.paramwin); // bindMgr.BindFld(this, this.ds); DataTable tab = this.ds.Tables["部门信息"]; this.bindMgr.BindTrv(this.treDept, tab, "名称", "ID", "PID", "@ID={ID},@PID={PID},@编号={编号},@站址={站址}"); this.treDept.ExpandAll(); this.treDept.FocusedNodeChanged += new DevExpress.XtraTreeList.FocusedNodeChangedEventHandler(treDept_FocusedNodeChanged); FrmDataGrid(); }
private void FrmCheckWorkList_Load(object sender, EventArgs e) { //初始化参数和单元 this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); this.unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 BindManager bg = new BindManager(this); NameObjectList ps = new NameObjectList(); ParamManager.MergeParam(ps, this.paramwin); this.dateStart.EditValue = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm"); this.dateEnd.EditValue = System.DateTime.Now.AddDays(1).ToString("yyyy-MM-dd HH:mm"); ps["StartDate"] = this.dateStart.EditValue.ToString(); ps["EndDate"] = this.dateEnd.EditValue.ToString(); ds = bg.BuildDataset(this.unitItem, ps); InitLookUp(); }
private void FrmCarParkInfo_Load(object sender, EventArgs e) { //读取业务单元和传递参数 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); bg.BindFld(this, this.dsUnit); this.Query = new QueryDataRes(this.unitItem.DataSrcFile); DataTable tab = initDev(); if (null == tab || tab.Rows.Count < 1) { XtraMessageBox.Show("请设置发行器", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void FrmQueryManage_Load(object sender, EventArgs e) { //初始化参数和单元 this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); this.unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 BindManager bg = new BindManager(this); this.dsUnit = bg.BuildDataset(this.unitItem, this.paramwin); bg.BindFld(this, this.dsUnit); DataTable tab = this.dsUnit.Tables["停车记录"]; if (null == tab || tab.Rows.Count < 1) { return; } LoadCardTyep(); LoadDev(); }
private void FrmOperatorTotal_Load(object sender, EventArgs e) { //初始化参数和单元 this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); this.unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 BindManager bg = new BindManager(this); NameObjectList ps = new NameObjectList(); ParamManager.MergeParam(ps, this.paramwin); this.dateStart.EditValue = System.DateTime.Now.ToString("yyyy-MM-dd"); ps["dt"] = this.dateStart.EditValue.ToString(); ps["type"] = null; ps["UserName"] = null; ds = bg.BuildDataset(this.unitItem, ps); InitLookUp(); InitDoor(); }
private void FrmTable_Load(object sender, EventArgs e) { //读取业务单元和传递参数 this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); unitName = pstrans["name"].ToString();//单元 this.Text = this.CountRecordGroup.Text = unitName; //获取当前单元名称 Dictionary <string, string> dict = new Dictionary <string, string>(); dict.Add("入场车流量统计表", "@db=入场车流量统计"); dict.Add("出场车流量统计表", "@db=出场车流量统计"); dict.Add("停车场收费统计表", "@db=停车场收费统计"); dict.Add("收费员收费统计表", "@db=收费员收费统计"); dict.Add("远程控制记录统计表", "@db=stateremote"); //数据源 string datasource = dict[this.unitName]; this.RecordGrid.Tag = datasource; NameObjectList ps = new NameObjectList(); ParamManager.MergeParam(ps, this.paramwin); ps["dt"] = this.dtpDate.Value; ps["type"] = this.cbRecordTp.SelectedIndex + 1; ps["操作员"] = null; unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 BindManager bg = new BindManager(this); ds = bg.BuildDataset(this.unitItem, ps); bg.BindFld(this, ds); //特殊业务处理 this.lbcount.Text = "总记录: " + Convert.ToString(ds.Tables[0].Rows.Count) + " 条"; }
private void FrmSetSyetem_Load(object sender, EventArgs e) { DevListGrid.Hide(); //初始化参数和单元 this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); this.unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), Convert.ToString(pstrans["name"])); this.Text = this.unitItem.UnitName; //绑定数据 BindManager bg = new BindManager(this); this.dsUnit = bg.BuildDataset(this.unitItem, this.paramwin); if (this.dsUnit.Tables.Contains("设备列表")) { DataTable tab = this.dsUnit.Tables["设备列表"]; if (tab.Columns.Contains("选择")) { tab.Columns.Remove("选择"); } tab.Columns.Add("选择", typeof(bool)); } bg.BindFld(this, this.dsUnit); //显示指定字段 // bg.SetGridCols(this.dbGrid, "选择 60,名称 设备名称,地址,端口,设备地址,访问方式,备注"); foreach (DataGridViewColumn col in this.dbGrid.Columns) { if ("选择" == col.Name) { continue; } col.ReadOnly = true; } }
private void FrmRemotGate_Load(object sender, EventArgs e) { this.paramwin = BindManager.getSystemParam(); NameObjectList pstrans = BindManager.getTransParam(); ParamManager.MergeParam(this.paramwin, pstrans); unitName = pstrans["name"].ToString();//单元 this.Text = RemotGroup.Text = unitName; //获取当前单元名称 Dictionary <string, string> dict = new Dictionary <string, string>(); dict.Add("远程控制记录", "@db=remote_control"); dict.Add("入、出场记录历史查询", "@db=park_stall"); //dict.Add("非法开闸记录", "@db=InvalidOpenGate"); //数据源 string datasource = dict[this.unitName]; this.dbGrid.Tag = datasource; unitItem = new UnitItem(DataAccRes.AppSettings("WorkConfig"), unitName); //绑定数据 BindManager bg = new BindManager(this); ds = bg.BuildDataset(this.unitItem, this.paramwin); bg.BindFld(this, ds); //特殊业务处理 int count = this.dbGrid.Rows.Count - 1; if (count < 0) { count = 0; } //this.lblCount.Text = "总计 " + Convert.ToString(count) + " 条"; }