Exemplo n.º 1
0
        /// <summary>
        /// 加载收费标准
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SetFeeBtn_Click(object sender, EventArgs e)
        {
            int[]  indexlist = this.getCheckedList();
            string msg       = "";

            if (indexlist.Length < 1)
            {
                msg = "请选择一个设备";
            }
            else if (indexlist.Length > 1)
            {
                msg = "不能同时巡检多个设备";
            }
            if (!string.IsNullOrEmpty(msg))
            {
                MessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            DataTable tab = this.dbGrid.DataSource as DataTable;
            DataRow   dr  = tab.Rows[indexlist[0]];

            BindManager.setTransParam(ParamManager.createParam(dr));

            FrmFeePara win = new FrmFeePara();

            win.DeviceID   = Convert.ToString(dr["站址"]);
            win.DeviceName = Convert.ToString(dr["名称"]);
            win.Target     = this.getTarget(dr);
            win.ShowDialog(this);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 加载收费标准
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SetFeeBtn_Click(object sender, EventArgs e)
        {
            int[] indexlist = this.getCheckedList();
            string msg = "";
            if (indexlist.Length < 1)
                msg = "请选择一个设备";
            else if (indexlist.Length > 1)
                msg = "不能同时巡检多个设备";
            if (!string.IsNullOrEmpty(msg))
            {
                MessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            DataTable tab = this.dbGrid.DataSource as DataTable;
            DataRow dr = tab.Rows[indexlist[0]];
            BindManager.setTransParam(ParamManager.createParam(dr));

            FrmFeePara win = new FrmFeePara();
            win.DeviceID = Convert.ToString(dr["站址"]);
            win.DeviceName = Convert.ToString(dr["名称"]);
            win.Target = this.getTarget(dr);
            win.ShowDialog(this);
        }