当前位置: 首页>>代码示例>>C#>>正文


C# PSPDEV类代码示例

本文整理汇总了C#中PSPDEV的典型用法代码示例。如果您正苦于以下问题:C# PSPDEV类的具体用法?C# PSPDEV怎么用?C# PSPDEV使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PSPDEV类属于命名空间,在下文中一共展示了PSPDEV类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: init

        public void init(PSPDEV psxl)
        {
            try
            {
                if (dataTable != null)
                {
                    dataTable.Columns.Clear();
                    treeList1.Columns.Clear();
                }
                AddFixColumn();
                //Ps_pdreltype pr = new Ps_pdreltype();
                //pr.ProjectID = Itop.Client.MIS.ProgUID;
                //pr.ID = psxl.SUID;
                string con = "ID='" + psxl.SUID + "'";
                IList<Ps_pdreltype> listTypes = Services.BaseService.GetList<Ps_pdreltype>("SelectPs_pdreltypeByCon", con);
                barButtonItem1.Enabled = false;
                bar2.Visible = false;

                dataTable = Itop.Common.DataConverter.ToDataTable((IList)listTypes, typeof(Ps_pdreltype));
                treeList1.BeginInit();
                treeList1.DataSource = dataTable;

                //treeList1.Columns["Sort"].SortOrder = SortOrder.Ascending;
                treeList1.EndInit();
                Application.DoEvents();
                treeList1.ExpandAll();
            }
            catch (System.Exception ex)
            {

            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:32,代码来源:UcPdreltype.cs

示例2: UpdateBDZ

        /// <summary>
        /// ������·ĸ�߸������ڱ��վ
        /// </summary>
        /// <param name="line"></param>
        public static void UpdateBDZ(PSPDEV line)
        {
            LineInfo lineinfo = UCDeviceBase.DataService.GetOneByKey<LineInfo>(line.SUID);
            if (lineinfo == null) {
                return;
            }
            string iname = line.IName;
            string jname = line.JName;

            string sql = "where (name='" + iname + "' ) and projectid='" + Itop.Client.MIS.ProgUID + "' and Type='05' ORDER BY Number";
            IList<PSPDEV> list = UCDeviceBase.DataService.GetList<PSPDEV>("SelectPSPDEVByCondition", sql);
            string bdz1 = "";
            string bdz2 = "";
            if (list.Count > 0) {
               bdz1= DeviceHelper.GetBdzNameByID(list[0].SvgUID);
            }
            sql = "where (name='" + jname + "' ) and projectid='" + Itop.Client.MIS.ProgUID + "' and Type='05' ORDER BY Number";
            list = UCDeviceBase.DataService.GetList<PSPDEV>("SelectPSPDEVByCondition", sql);
            if (list.Count > 0) {
               bdz2= DeviceHelper.GetBdzNameByID(list[0].SvgUID);
            }
            lineinfo.ObligateField6 = bdz1;
            lineinfo.ObligateField7 = bdz2;
            UCDeviceBase.DataService.Update<LineInfo>(lineinfo);
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:29,代码来源:UCDeviceXL.cs

示例3: frmLinenew

        public frmLinenew(PSPDEV pspDev)
        {
            InitializeComponent();
            mc.Select();
            WireCategory wirewire = new WireCategory();
            wirewire.WireLevel = pspDev.VoltR.ToString();
            IList list1 = Services.BaseService.GetList("SelectWireCategoryListBYWireLevel", wirewire);
            foreach (WireCategory sub in list1)
            {
                comboBox22.Properties.Items.Add(sub.WireType);
            }
            InitData(pspDev);
            this.comboBox22.SelectedIndexChanged += new System.EventHandler(this.comboBox22_SelectedIndexChanged);
            this.textBox11.Leave += new System.EventHandler(this.textBox11_Leave);
            this.textBox11.TextChanged += new System.EventHandler(this.textBox11_TextChanged);
            this.comboBoxEdit1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEdit1_SelectedIndexChanged);
            this.comboBoxEdit1.Leave += new System.EventHandler(this.comboBoxEdit1_Leave);
            object[] o = new object[30];

            for (int i = 0; i < 30; i++)
            {
                o[i] = 2009 + i;
            }
            this.tyear.Properties.Items.AddRange(o);
            //this.tyear.Visible = false;
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:26,代码来源:frmlinenew.cs

示例4: frmMuLian

 public frmMuLian(PSPDEV dev, string svgDocumentUID)
 {
     svgUID = svgDocumentUID;
     InitializeComponent();
     InitCom();
     InitData(dev);
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:7,代码来源:frmMuLian.cs

示例5: init

 public void init(PSPDEV psxl)
 {
     if (psxl!=null)
     {
         ucPdreltype1.init(psxl);
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:7,代码来源:FrmpdrelProject.cs

示例6: createline

 private PSPDEV createline(SvgElement element)
 {
     PSPDEV pspDev = new PSPDEV();
     pspDev.SUID = Guid.NewGuid().ToString();
     pspDev.EleID = element.ID;
     pspDev.SvgUID = svgid;
     PSPDEV pspDev2 = (PSPDEV)Services.BaseService.GetObject("SelectPSPDEVBySvgUIDandEleID", pspDev);
     if (pspDev2 == null) {
         pspDev.Number = -1;
         pspDev.FirstNode = -1;
         pspDev.LastNode = -1;
         pspDev.Type = "Polyline";
         pspDev.Lable = "֧·";
         pspDev.Name = element.GetAttribute("info-name");
         IList list = Services.BaseService.GetList("SelectLineInfoByWhere", "eleid='" + pspDev.EleID + "'");
         if (list.Count > 0) {
             LineInfo line = list[0] as LineInfo;
             pspDev.Name = line.LineName;
             pspDev.VoltR = double.Parse(line.Voltage);
             pspDev.LineStatus = line.ObligateField1;
             try {
                 pspDev.LineLength = double.Parse(line.Length);
             } catch { }
             pspDev.LineType = line.LineType;
         }
         Services.BaseService.Create<PSPDEV>(pspDev);
     } else {
         pspDev = pspDev2;
     }
     return pspDev;
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:31,代码来源:ImportJxt2.cs

示例7: gridView_DoubleClick

        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);
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:60,代码来源:frmGProList.cs

示例8: Add

 public override void Add()
 {
     frmDXdlg dlg = new frmDXdlg();
     dlg.ProjectSUID = this.ProjectID;
     dlg.newflag = true;
     dlg.Name = "";
     PSPDEV p = new PSPDEV();
     p.ProjectID = this.ProjectID;
     p.JName = ParentID;
     dlg.DeviceMx = p;
     if (dlg.ShowDialog() == DialogResult.OK) {
         //���Ӽ�¼
         PSPDEV dev = dlg.DeviceMx;
         dev.ProjectID = this.ProjectID;
         UCDeviceBase.DataService.Create("InsertPSPDEV", dev);
         if (dev.NodeType == "0")
         {
             dev.NodeType = "ƽ��ڵ�";
         }
         else if (dev.NodeType == "1")
         {
             dev.NodeType = "PQ�ڵ�";
         }
         else if (dev.NodeType == "2")
         {
             dev.NodeType = "PV�ڵ�";
         }
         else
         {
             dev.NodeType = null;
         }
         if (dev.KSwitchStatus == "1")
         {
             dev.KSwitchStatus = "�˳�����";
         }
         else
         {
             dev.KSwitchStatus = "Ͷ������";
         }
         if (dev.UnitFlag == "0")
         {
             dev.UnitFlag = "p.u.";
         }
         else
         {
             if (dev.Type == "01" || dev.Type == "04" || dev.Type == "12")
             {
                 dev.UnitFlag = "kV/MW/MVar";
             }
             else
             {
                 dev.UnitFlag = "Ohm/10-6Siem";
             }
         }
         DataRow row=datatable1.NewRow();
         Itop.Common.DataConverter.ObjectToRow(dev, row);
         datatable1.Rows.Add(row);
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:59,代码来源:UCDeviceDX.cs

示例9: frmGNDLine

 public frmGNDLine(string svg,PSPDEV psp)
 {
     leel = psp;
     localsvgUID = svg;
     InitializeComponent();
     InitData(svg);
     InitFrm(psp);
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:8,代码来源:frmGNDLine.cs

示例10: BelonSubstationfrm

 public BelonSubstationfrm(PSPDEV pspDEV)
 {
     InitializeComponent();
     if (pspDEV.HuganLine1!=null)
     {
         mc.Text = pspDEV.HuganLine1;
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:8,代码来源:BelonSubstationfrm.cs

示例11: DefineDelform

        //����ͼ���SvgUID
        public DefineDelform(PSPDEV pspDEV)
        {
            InitializeComponent();
            pspulic = pspDEV;
            string strCon2 = null;
            string strCon1 = ",PSP_ELCDEVICE WHERE PSPDEV.SUID = PSP_ELCDEVICE.DeviceSUID AND PSP_ELCDEVICE.ProjectSUID = '" + pspulic.SvgUID + "'";
            strCon2 = " AND Type = '01'";
            string strCon = strCon1 + strCon2;
            IList listMX = UCDeviceBase.DataService.GetList("SelectPSPDEVByCondition", strCon);
            strCon2 = " AND Type = '05'";
            strCon = strCon1 + strCon2;
            IList listXL = UCDeviceBase.DataService.GetList("SelectPSPDEVByCondition", strCon);
            strCon2 = " AND Type = '02'";
            strCon = strCon1 + strCon2;
            IList listBYQ2 = UCDeviceBase.DataService.GetList("SelectPSPDEVByCondition", strCon);
            strCon2 = " AND Type = '03'";
            strCon = strCon1 + strCon2;
            IList listBYQ3 = UCDeviceBase.DataService.GetList("SelectPSPDEVByCondition", strCon);

              int linecount=listXL.Count;
            for (int i = 0; i < listXL.Count; i++)
            {
                pspDEV = (PSPDEV)listXL[i];
                if (pspDEV.KSwitchStatus == "0")
                {

                   // psdevclass psd = new psdevclass(pspDEV.Number,pspDEV.FirstNode,pspDEV.LastNode, pspDEV.Name);

                    this.WaitLinelist.Items.Add(new psdevclass(i+1, pspDEV.FirstNode, pspDEV.LastNode,pspDEV.Type, pspDEV.Name));

                }
            }
            int trans2count=listBYQ2.Count;
            for (int i = 0; i <listBYQ2.Count; i++)
            {
                pspDEV = (PSPDEV)listBYQ2[i];
                psdevclass psd = new psdevclass(linecount+i+1, pspDEV.FirstNode, pspDEV.LastNode,pspDEV.Type, pspDEV.Name);
                this.WaitLinelist.Items.Add(psd);
            }
            //psp.Lable = "ĸ�߽ڵ�";
            for (int i = 0; i < listBYQ3.Count; i++)
            {
                pspDEV = (PSPDEV)listBYQ3[i];
                psdevclass psdi = new psdevclass(linecount+trans2count+i+1, pspDEV.FirstNode, pspDEV.LastNode, pspDEV.Type, pspDEV.Name+"i");
                psdevclass psdj = new psdevclass(linecount + trans2count + i + 2, pspDEV.FirstNode, pspDEV.Flag, pspDEV.Type, pspDEV.Name + "j");
                psdevclass psdk = new psdevclass(linecount + trans2count + i + 3, pspDEV.LastNode, pspDEV.Flag, pspDEV.Type, pspDEV.Name + "k");
                this.WaitLinelist.Items.Add(psdi);
                this.WaitLinelist.Items.Add(psdj);
                this.WaitLinelist.Items.Add(psdk);
            }
            foreach (PSPDEV dev in listMX)
            {
                comboBoxEdit1.Properties.Items.Add(dev.Name);
                //comboBoxEdit2.Properties.Items.Add(dev.Name);
            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:57,代码来源:DefineDelform.cs

示例12: InitData

        public void InitData()
        {
            PSPDEV pspDev = new PSPDEV();
            pspDev.SvgUID = svgUID;
            pspDev.Type = "GNDLine";
            IList list = Services.BaseService.GetList("SelectPSPDEVBySvgUIDAndType", pspDev);
            DataTable dt = Itop.Common.DataConverter.ToDataTable(list, typeof(PSPDEV));

            dataGridView1.DataSource = dt;
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:10,代码来源:frmGNDLineParam.cs

示例13: Add

        public override void Add()
        {
            frmFHZLdlg dlg = new frmFHZLdlg();
            if (ID == "63" || ID == "64")
            {
                dlg.SetEnable();
            }
            dlg.ParentID = ParentID;
            dlg.Name = "";
            dlg.ProjectID = this.ProjectID;
            PSPDEV pd = new PSPDEV();
            pd.AreaID = ParentID;
            pd.ProjectID = ProjectID;

            Stream fs = Assembly.GetExecutingAssembly().GetManifestResourceStream("Itop.TLPSP.DEVICE.devicetypes.xml");
            //Assembly.GetExecutingAssembly().GetManifestResourceStream
            XmlDocument xml = new XmlDocument();
            xml.Load(fs);
            XmlNode node = xml.SelectSingleNode("devicetype/*[@id='" + ID + "']");
            if (ID!=null)
            {
                dlg.Text = node.Attributes["name"].Value.ToString() + "��Ϣ";
            }
            dlg.DeviceMx = pd;
            //if(ID=="55"){
            //    dlg.Text = "����վ��Ϣ";
            //}
            //if (ID == "56")
            //{
            //    dlg.Text = "��������Ϣ";
            //}
            //if (ID == "57")
            //{
            //    dlg.Text = "���Ͽ�����Ϣ";
            //}
            //if (ID == "58")
            //{
            //    dlg.Text = "���·�֧����Ϣ";
            //}
            //if (ID == "59")
            //{
            //    dlg.Text = "���ɿ�����Ϣ";
            //}
            if (dlg.ShowDialog() == DialogResult.OK) {
                //���Ӽ�¼
                PSPDEV dev = dlg.DeviceMx;
                dev.Type = ID;
                dev.ProjectID = this.ProjectID;
                UCDeviceBase.DataService.Create("InsertPSPDEV", dev);
                DataRow row=datatable1.NewRow();

                Itop.Common.DataConverter.ObjectToRow(dev, row);
                datatable1.Rows.Add(row);
            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:55,代码来源:UCDevicePWFHZL.cs

示例14: PartRelform

        public PartRelform(PSPDEV pspDEV)
        {
            InitializeComponent();
            leel = pspDEV;
            //WireCategory wirewire = new WireCategory();
            //IList list1 = Services.BaseService.GetList("SelectWireCategoryList", wirewire);
            //foreach (WireCategory sub in list1)
            //{

            //}
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:11,代码来源:PartRelform.cs

示例15: dataGridView1_CellValueChanged

 void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
 {
     DataTable dt = dataGridView1.DataSource as DataTable;
     DataGridViewRow td =dataGridView1.CurrentRow;
     DataRow dr = dt.Rows[e.RowIndex];
     string guid = td.Cells["sUIDDataGridViewTextBoxColumn"].Value.ToString();
     string guid2 = td.Cells["voltRDataGridViewTextBoxColumn"].Value.ToString();
     string fadiansc = td.Cells["outPDataGridViewTextBoxColumn"].Value.ToString();
     string outq=td.Cells["outQDataGridViewTextBoxColumn"].Value.ToString();
     string inputp = td.Cells["inPutPDataGridViewTextBoxColumn"].Value.ToString();
     string intputq = td.Cells["inPutQDataGridViewTextBoxColumn"].Value.ToString();
     string bt = td.Cells["burthenDataGridViewTextBoxColumn"].Value.ToString();
     string Vmin=td.Cells["iV"].Value.ToString();
     string Vmax=td.Cells["jV"].Value.ToString();
     //string outq = td.Cells["outQDataGridViewTextBoxColumn"].Value.ToString();
     if (dr!=null)
     {
         PSPDEV temp = new PSPDEV();
         temp.SUID = guid;
         temp = (PSPDEV)Services.BaseService.GetObject("SelectPSPDEVByKey", temp);
         if (guid2 == "")
             guid2 = "0";
         if (fadiansc == "")
             fadiansc = "0";
         if (outq == "")
             outq = "0";
         if (inputp == "")
             inputp = "0";
         if (intputq == "")
             intputq = "0";
         if (bt == "")
             bt = "0";
         if (Vmin == "")
         {
             Vmin = "0";
         }
         if (Vmax == "")
         {
             Vmax = "0";
         }
         temp.VoltR = Convert.ToDouble(guid2);
         temp.OutP = Convert.ToDouble(fadiansc);
         temp.OutQ = Convert.ToDouble(outq);
         temp.InPutP = Convert.ToDouble(inputp);
         temp.InPutQ = Convert.ToDouble(intputq);
         temp.Burthen = Convert.ToDecimal(bt);
         temp.iV = Convert.ToDouble(Vmin);
         temp.jV = Convert.ToDouble(Vmax);
         Services.BaseService.Update<PSPDEV>(temp);
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:51,代码来源:frmVoltLimit.cs


注:本文中的PSPDEV类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。