/// <summary> /// 有效卡 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ValidCardBtn_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)); FrmValCard ValCard = new FrmValCard(); ValCard.DeviceID = Convert.ToString(dr["站址"]); ValCard.DeviceName = Convert.ToString(dr["名称"]); ValCard.Target = this.getTarget(dr); ValCard.Query = new QueryDataRes("设备控制维护"); ValCard.ShowDialog(this); }
/// <summary> /// 有效卡 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ValidCardBtn_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)); FrmValCard ValCard = new FrmValCard(); ValCard.DeviceID = Convert.ToString(dr["站址"]); ValCard.DeviceName = Convert.ToString(dr["名称"]); ValCard.Target = this.getTarget(dr); ValCard.Query = new QueryDataRes("设备控制维护"); ValCard.ShowDialog(this); }