private void FrmDepositAll_del_Load(object sender, EventArgs e) { this.dgvlist.RowPostPaint += new DataGridViewRowPostPaintEventHandler(dbgrid_RowPostPaint); dgvlist.DataSource = tabSource; BindManager mgr = new BindManager(this); mgr.SetGridCols(this.dgvlist, "卡号 80,姓名 80,卡类名称 卡类 60, 车型名称 车型 60,入场日期 110,进场日期 110, 停车时长 120,押金到期 110,卡片余额 60,停车费用 60"); }
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 FrmCardMakeS_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); //������ this.bindMgr = new BindManager(this); this.dsUnit = this.bindMgr.BuildDataset(this.unitItem, this.paramwin); this.bindMgr.BindFld(this, dsUnit); this.Query = new QueryDataRes(this.unitItem.DataSrcFile); ///��ⷢ���� /// bindMgr.SetGridCols(this.dbUser, "����,����,��������"); DataTable taboption = initSet(); if (null == taboption || taboption.Rows.Count < 1) XtraMessageBox.Show("�����÷�����", "ϵͳ��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Warning); lblMessage.Text = ""; ShowType(); tabCardApp.SelectedTabPageIndex = 2; }
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"); ; }