private void pshi_one_Click(object sender, EventArgs e)
        {

            intStationHeadID = int.Parse(((PanelStationHeadInfo)sender).Tag.ToString());
            blIsUpDate = false;

            A_Station_Head_Add fr = new A_Station_Head_Add(this);

            fr.ShowDialog();

            //pl_AddStaHeadInfo.Visible = true;
            //pl_AddStaHeadInfo.BringToFront();

            //bcp_StaHeadTitle.CaptionTitle = "查看读卡分站";

            //DataRow dr = sbll.getStationHeadRowInfo(int.Parse(((PanelStationHeadInfo)sender).Tag.ToString()));

            //txt_StaHead_StaAddress.Text = dr["StationAddress"].ToString();
            //txt_StaHeadAddress.Text = dr["StationHeadAddress"].ToString();

            //txt_StaHeadAddress.Enabled = false;
            //txt_StaHeadPlace.Text = dr["StationHeadPlace"].ToString();
            //txt_StaHeadTel.Text = dr["StationHeadTel"].ToString();
            //txt_StaHeadAntennaA.Text = dr["AntennaA"].ToString();
            //txt_StaHeadAntennaB.Text = dr["AntennaB"].ToString();
            //if (dr["StationHeadTypeID"].ToString().Equals("8"))
            //{
            //    rb_WellHead.Checked = true;
            //}
            //else
            //{
            //    rb_WellUp.Checked = true;
            //}
            //txt_StaHeadRemark.Text = dr["Remark"].ToString();

            //bt_StaHead_Reset.Enabled = false;
            //bt_StaHead_Save.Enabled = gb_AddStaHeadInfo.Enabled = false;
            //lb_StaHeadTipsInfo.Visible = lb_StaHeadTipsInfo2.Visible = false;
            
        }
        private void smvpSingleStation_ClickAddStationHead(object sender, EventArgs e)
        {
            tempSingleStation = (StationMakeupVspanel)((StationCaptionPanel)((ButtonCaptionPanel)sender).Parent).Parent;
            
            cmsStationHand1 = tempSingleStation.StationAddress;
            cmsStationHand2 = tempSingleStation.StationAddress.ToString();

            intStationAddressJudgment = tempSingleStation.StationAddress;
            intStationHeadID = -1;

            A_Station_Head_Add frm = new A_Station_Head_Add(this);
            frm.ShowDialog();

            //DialogResult dr = frm.ShowDialog();
            //if (dr == DialogResult.OK)
            //{
            //    #region【刷新】

            //    if (!New_DBAcess.IsDouble)
            //    {
            //        //清空添加面板
            //        ClearStaHead();

            //        // 清空接收器panel
            //        if (tempSingleStation != null)
            //        {
            //            for (int i = tempSingleStation.Controls.Count - 1; i >= 0; i--)
            //            {
            //                if (tempSingleStation.Controls[i].GetType().ToString() == "KJ128WindowsLibrary.PanelStationHeadInfo")
            //                {
            //                    tempSingleStation.Controls.RemoveAt(i);
            //                }
            //            }

            //            // 重新加载
            //            DataTable dsStationHead = sbll.getStationHeadInfoAll(int.Parse(tempSingleStation.StationAddress.ToString()));
            //            if (dsStationHead != null)
            //            {
            //                if (dsStationHead.Rows.Count > 0)
            //                {
            //                    foreach (DataRow drStationHead in dsStationHead.Rows)
            //                    {
            //                        addPanelStationHeadInfo(tempSingleStation, drStationHead);
            //                    }
            //                }
            //            }
            //        }
            //    }
            //    else
            //    {
            //        timer1.Start();
            //    }
            //    #endregion
            //}
            //    //添加——接收器信息
            //pl_AddStaHeadInfo.Visible = true;
            //pl_AddStaHeadInfo.BringToFront();

            ////清空
            //ClearStaHead();

            ////tempSingleStation = (StationMakeupVspanel)((StationCaptionPanel)((ButtonCaptionPanel)sender).Parent).Parent;
            ////判断是A版,还是V2版
            //if (GetStationModel(tempSingleStation.StationAddress))     //A版
            //{
            //    txt_StaHeadAddress.Text = "";
            //    txt_StaHeadAddress.Enabled = true;
            //}
            //else                                                        //V2版
            //{
            //    txt_StaHeadAddress.Text = "1";
            //    txt_StaHeadAddress.Enabled = false;
            //}
            //txt_StaHead_StaAddress.Text = tempSingleStation.StationAddress.ToString();

            //bcp_StaHeadTitle.CaptionTitle = "新增读卡分站";


            //bt_StaHead_Reset.Enabled = true;
            //bt_StaHead_Save.Enabled = gb_AddStaHeadInfo.Enabled = true;
            //lb_StaHeadTipsInfo.Visible = lb_StaHeadTipsInfo2.Visible = false;
        }
        private void FrmStationManage_Click(object sender, EventArgs e)
        {
            //单击右键菜单->修改 ——接收器信息
            //pl_AddStaHeadInfo.Visible = true;
            //pl_AddStaHeadInfo.BringToFront();

            //bcp_StaHeadTitle.CaptionTitle = "修改读卡分站";
            cmsStationHand1 = int.Parse(cmsStationHand.Tag.ToString());

            intStationHeadID = cmsStationHand1;
            blIsUpDate = true;

            A_Station_Head_Add fr = new A_Station_Head_Add(this);

            fr.ShowDialog();

            //DialogResult dr = fr.ShowDialog();
            //if (dr == DialogResult.OK)
            //{
            //    #region【刷新】

            //    if (!New_DBAcess.IsDouble)
            //    {
            //        //清空添加面板
            //        ClearStaHead();

            //        // 清空接收器panel
            //        if (tempSingleStation != null)
            //        {
            //            for (int i = tempSingleStation.Controls.Count - 1; i >= 0; i--)
            //            {
            //                if (tempSingleStation.Controls[i].GetType().ToString() == "KJ128WindowsLibrary.PanelStationHeadInfo")
            //                {
            //                    tempSingleStation.Controls.RemoveAt(i);
            //                }
            //            }

            //            // 重新加载
            //            DataTable dsStationHead = sbll.getStationHeadInfoAll(int.Parse(tempSingleStation.StationAddress.ToString()));
            //            if (dsStationHead != null)
            //            {
            //                if (dsStationHead.Rows.Count > 0)
            //                {
            //                    foreach (DataRow drStationHead in dsStationHead.Rows)
            //                    {
            //                        addPanelStationHeadInfo(tempSingleStation, drStationHead);
            //                    }
            //                }
            //            }

            //        }
            //    }
            //    else
            //    {
            //        timer1.Start();
            //    }
            //    #endregion
            //}
            //DataRow dr = sbll.getStationHeadRowInfo(int.Parse(cmsStationHand.Tag.ToString()));

            //txt_StaHead_StaAddress.Text = dr["StationAddress"].ToString();
            //txt_StaHeadAddress.Text = dr["StationHeadAddress"].ToString();

            //txt_StaHeadAddress.Enabled = false;
            //txt_StaHeadPlace.Text = dr["StationHeadPlace"].ToString();
            //txt_StaHeadTel.Text = dr["StationHeadTel"].ToString();
            //txt_StaHeadAntennaA.Text = dr["AntennaA"].ToString();
            //txt_StaHeadAntennaB.Text = dr["AntennaB"].ToString();
            //if (dr["StationHeadTypeID"].ToString().Equals("8"))
            //{
            //    rb_WellHead.Checked = true;
            //}
            //else
            //{
            //    rb_WellUp.Checked = true;
            //}
            //txt_StaHeadRemark.Text = dr["Remark"].ToString();

            //bt_StaHead_Reset.Enabled = false;
            //bt_StaHead_Save.Enabled = gb_AddStaHeadInfo.Enabled = true;
            //lb_StaHeadTipsInfo.Visible = lb_StaHeadTipsInfo2.Visible = false;
        }