Exemplo n.º 1
0
        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) + " 条";
        }
Exemplo n.º 2
0
        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) + " 条";
        }
Exemplo n.º 3
0
 private void FrmTest_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.ds = bg.BuildDataset(this.unitItem, this.paramwin);
     bg.BindFld(this, this.ds);
 }
Exemplo n.º 4
0
 private void FrmCardParam_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);
 }
Exemplo n.º 5
0
        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);
            }
        }
Exemplo n.º 6
0
 private void FrmAddReduceMoney_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);
     bg.BindFld(this, ds);
     InitLookUp();
 }
Exemplo n.º 7
0
 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;
 }
Exemplo n.º 8
0
 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();
 }
Exemplo n.º 9
0
 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();
 }
Exemplo n.º 10
0
 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);
 }
Exemplo n.º 11
0
        /// <summary>
        /// 刷新界面
        /// </summary>
        private void refresh()
        {
            BindManager bindmgr = new BindManager(this);
            bindmgr.BindFld(this, this.ds);
            DataTable tab = DataSource.Tables["设备列表"];
            BindingManagerBase frmmgr = this.BindingContext[tab];
            if (position < 0 || tab.Rows.Count < 1)
                return;
            if (position > 0)
                frmmgr.Position = position;
            //通道类型
            DataRow dr = ((DataRowView)frmmgr.Current).Row;
            bool channelbycard = this.CardTpRadio.Checked = Convert.ToBoolean(dr["通道选择类型"]);
            Panel plchannel = this.plCarType;
            if (channelbycard)
            {
                this.plCarType.Hide();
                this.plCardType.Show();
                plchannel = this.plCardType;
            }
            this.CarTpRadio.Checked = !channelbycard;
            //通道,卡类允许,放行控制 三项分组选配内容
            this.setCheckedsgrp(this.grpbChannel, "通道选择内容", Convert.ToString(dr["通道选择内容"]));
            this.setCheckedsgrp(this.grpbCardType, "卡类允许", Convert.ToString(dr["卡类允许"]));
            this.setCheckedsgrp(this.grpbAccept, "放行控制", Convert.ToString(dr["放行控制"]));

            if ("通讯" == this.funType)
                this.plBtngrp.Show();
            else
                this.plBtngrp.Hide();
        }
Exemplo n.º 12
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();

            }
        }
Exemplo n.º 13
0
        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 + ")";
            }
        }
Exemplo n.º 14
0
 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"); ;
 }
Exemplo n.º 15
0
 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);
 }
Exemplo n.º 16
0
        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;
            }
        }
Exemplo n.º 17
0
 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);
 }
Exemplo n.º 18
0
        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 + ")";
        }
Exemplo n.º 19
0
 /// <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);
 }