Exemplo n.º 1
0
        private void gridView_DoubleClick(object sender, EventArgs e)
        {
            List<LineInfo> clist =new List<LineInfo>();
            clist.Clear();
            LineInfo a = gridView.GetRow(this.gridView.FocusedRowHandle) as LineInfo;
            PSPDEV psp = new PSPDEV();
            psp.SvgUID = a.SvgUID;
            psp.Type = "Polyline";
            IList list1 = Services.BaseService.GetList("SelectPSPDEVBySvgUIDAndType", psp);
            if (a.ObligateField1=="�������ܹ滮")
            {
                for (int i = 0; i < list1.Count;i++ )
                {
                    LineInfo l1 = new LineInfo();
                    psp = list1[i] as PSPDEV;
                    if (psp.LineStatus=="�ȴ�")
                    {

                        l1.EleID = psp.EleID;
                        l1.ObligateField2 = psp.Name;
                        l1.ObligateField3 = "��̭";
                        clist.Add(l1);
                    }
                    else if (psp.LineStatus=="��ѡ")
                    {
                        l1.EleID = psp.EleID;
                        l1.ObligateField2 = psp.Name;
                        l1.ObligateField3 = "��ѡ";
                        clist.Add(l1);
                    }
                }
            }
            else
            {
                for (int i = 0; i < list1.Count; i++)
                {
                    LineInfo l1 = new LineInfo();
                    psp = list1[i] as PSPDEV;
                    if (psp.LineStatus == "�ȴ�")
                    {

                        l1.EleID = psp.EleID;
                        l1.ObligateField2 = psp.Name;
                        l1.ObligateField3 = "��ѡ";
                        clist.Add(l1);
                    }
                    else if (psp.LineStatus == "��ѡ")
                    {
                        l1.EleID = psp.EleID;
                        l1.ObligateField2 = psp.Name;
                        l1.ObligateField3 = "����";
                        clist.Add(l1);
                    }
                }
            }
            FormGXXlist gxx = new FormGXXlist();
            gxx.gridview.GroupPanelText = a.ObligateField1+"��·���";
            gxx.Show();
            gxx.LoadData(clist);
        }
Exemplo n.º 2
0
 /// <summary>
 /// ˢ�±���е�����
 /// </summary>
 /// <returns>ture:�ɹ�  false:ʧ��</returns>
 public bool InitData(string svgUid,string sid)
 {
     try
     {
         LineInfo line = new LineInfo();
         line.SvgUID = svgUid;
         line.LayerID = sid;
         DataTable dt = Itop.Common.DataConverter.ToDataTable(Services.BaseService.GetList("SelectLineInfoBySvgUIDAndLayer", line), typeof(LineInfo));
         gridControl.DataSource = dt;
         gridControl.Text = "��·�б�";
     }
     catch (Exception exc)
     {
         Debug.Fail(exc.Message);
         HandleException.TryCatch(exc);
         return false;
     }
     return true;
 }
Exemplo n.º 3
0
 private void gridControl_DoubleClick(object sender, EventArgs e)
 {
     //this.DialogResult = DialogResult.OK;
     line = this.gridView.GetRow(this.gridView.FocusedRowHandle) as LineInfo;
     //line = ObjectList[this.gridView.FocusedRowHandle];
     string aa = "";
     this.Close();
 }
Exemplo n.º 4
0
 private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (treeView1.SelectedNode != null)
     {
         yearid = treeView1.SelectedNode.Tag.ToString();
         LineInfo line = new LineInfo();
         line.UID = yearid;
         line.EleID = power;
         // line.LayerID = sid;
         //DataTable dt = Itop.Common.DataConverter.ToDataTable(Services.BaseService.GetList("SelectLineInfoByPowerKvAndYear", line), typeof(LineInfo));
         gridControl.DataSource = Services.BaseService.GetList("SelectLineInfoByPowerKvAndYear", line);//dt;
         this.Text = power + "kV 线路列表";
     }
 }
Exemplo n.º 5
0
        /// <summary>
        ///�ֱ�����һ����· ���м��
        /// <param name="GprogUID">
        /// Ϊ�����Ż���ĿID
        /// </param>
        /// <param name="Type">
        /// Ϊ�Ǹ�ʱ�ڵ������Ż���1Ϊ���塢2���ڡ�3���ڡ�4Զ�ڣ�
        /// </param>
        /// <param name="SUID">
        /// Ϊ������·��ID
        /// </param>
        /// </summary>
        public List<LineInfo> LoadData(string GprogUID)
        {
            //�ڴ���ʱ����ͼ��Ĵ�ѡ���Ǵ������ԣ���ѡ�͵ȴ����Ծ���û����ǰ�Ĵ�ѡ

            List<LineInfo> clist = new List<LineInfo>();
            int c1 = 0;
            int c2 = 0;
            int c3 = 0;
            int d1 = 0;
            int d2 = 0;
            int d3 = 0;
            int e1 = 0;
            int e2 = 0;
            int e3 = 0;
            int f1 = 0;
            int f2 = 0;
            int f3 = 0;
            string con = null;
            con = "WHERE Type='05' AND SUID in (select DeviceSUID from PSP_GprogElevice where GprogUID='" + GprogUID + "'and type='��·'and ZTstatus='����') ";
            IList list1 = Services.BaseService.GetList("SelectPSPDEVByCondition", con);
            f1 = list1.Count;
            con = "WHERE Type='05' AND SUID in (select DeviceSUID from PSP_GprogElevice where GprogUID='" + GprogUID + "'and type='��·'and ZTstatus='��ѡ') ";
            list1 = Services.BaseService.GetList("SelectPSPDEVByCondition", con);
            f2 = list1.Count;
            con = "WHERE Type='05' AND SUID in (select DeviceSUID from PSP_GprogElevice where GprogUID='" + GprogUID + "'and type='��·'and JQstatus in('Ͷ��','��ѡ')) ";
            list1 = Services.BaseService.GetList("SelectPSPDEVByCondition", con);
            c2= list1.Count;
            con = "WHERE Type='05' AND SUID in (select DeviceSUID from PSP_GprogElevice where GprogUID='" + GprogUID + "'and type='��·'and JQstatus ='Ͷ��') ";
            list1 = Services.BaseService.GetList("SelectPSPDEVByCondition", con);
            c3 = list1.Count;
            con = "WHERE Type='05' AND SUID in (select DeviceSUID from PSP_GprogElevice where GprogUID='" + GprogUID + "'and type='��·'and ZQstatus in('Ͷ��','��ѡ')) ";
            list1 = Services.BaseService.GetList("SelectPSPDEVByCondition", con);
            d2 = list1.Count;
            con = "WHERE Type='05' AND SUID in (select DeviceSUID from PSP_GprogElevice where GprogUID='" + GprogUID + "'and type='��·'and ZQstatus ='Ͷ��') ";
            list1 = Services.BaseService.GetList("SelectPSPDEVByCondition", con);
            d3 = list1.Count;
            con = "WHERE Type='05' AND SUID in (select DeviceSUID from PSP_GprogElevice where GprogUID='" + GprogUID + "'and type='��·'and YQstatus in('Ͷ��','��ѡ')) ";
            list1 = Services.BaseService.GetList("SelectPSPDEVByCondition", con);
            e2 = list1.Count;
            con = "WHERE Type='05' AND SUID in (select DeviceSUID from PSP_GprogElevice where GprogUID='" + GprogUID + "'and type='��·'and YQstatus ='Ͷ��') ";
            list1 = Services.BaseService.GetList("SelectPSPDEVByCondition", con);
            e3 = list1.Count;

            LineInfo l4 = new LineInfo();
            l4.SvgUID = GprogUID;
            l4.EleID = "1";              //�˲���˵�����Ǹ�ʱ�ڵ�ѡ��
            l4.ObligateField1 = "�������ܹ滮";
            l4.ObligateField2 = f1.ToString();
            l4.ObligateField3 = f2.ToString();
            //l1.ObligateField4 = c3.ToString();
            LineInfo l1 = new LineInfo();
            l1.SvgUID = GprogUID;
            l1.EleID = "2";
            l1.ObligateField1 = "�������ܹ滮";
            l1.ObligateField2 = f1.ToString();
            l1.ObligateField3 = c2.ToString();
            l1.ObligateField4 = c3.ToString();
            LineInfo l2 = new LineInfo();
            l2.SvgUID = GprogUID;
            l2.EleID = "3";
            l2.ObligateField1 = "�������ܹ滮";
            l2.ObligateField2 = f1.ToString();
            l2.ObligateField3 = d2.ToString();
            l2.ObligateField4 = d3.ToString();
            LineInfo l3 = new LineInfo();
            l3.SvgUID = GprogUID;
            l3.EleID = "4";
            l3.ObligateField1 = "Զ�����ܹ滮";
            l3.ObligateField2 = f1.ToString();
            l3.ObligateField3 = e2.ToString();
            l3.ObligateField4 = e3.ToString();
            clist.Add(l4);
            clist.Add(l1);
            clist.Add(l2);
            clist.Add(l3);
            return clist;
        }