public static object SelectDevice(string type) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType(type); if (dlg.ShowDialog() == DialogResult.OK) { return(dlg.GetSelectedDevice()["device"]); } return(null); }
private void comboBoxEdit2_Properties_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("01"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary <string, object> dic = dlg.GetSelectedDevice(); PSPDEV devzx = dic["device"] as PSPDEV; S1 = devzx.SUID; } }
private void buttonEdit2_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("20", "30"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary <string, object> dic = dlg.GetSelectedDevice(); buttonEdit2.Text = dic["name"].ToString(); dev.SvgUID = dic["id"].ToString(); } }
private void buttonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("20", "30"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary <string, object> dic = dlg.GetSelectedDevice(); buttonEdit1.Text = dic["name"].ToString(); dev.SvgUID = dic["id"].ToString(); } }
private void buttonEdit2_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("05", "07", "54", "55", "56", "57", "62", "63", "64", "70", "71", "73", "74"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary <string, object> dic = dlg.GetSelectedDevice(); buttonEdit2.Text = dic["name"].ToString(); dev.JName = dic["id"].ToString(); } }
private void simpleButton3_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("01"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary <string, object> dic = dlg.GetSelectedDevice(); PSPDEV dev = dic["device"] as PSPDEV; dev.SvgUID = bdz.UID; Services.BaseService.Update <PSPDEV>(dev); freshxl(); } }
private void simpleButton5_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("70", "71", "72", "57", "59", "61", "62", "63", "64"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary <string, object> dic = dlg.GetSelectedDevice(); PSPDEV devzx = dic["device"] as PSPDEV; devzx.AreaID = dev.SUID; Services.BaseService.Update <PSPDEV>(devzx); initList(); } }
private void lookUpEdit1_Properties_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("05", "73"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary <string, object> dic = dlg.GetSelectedDevice(); PSPDEV devzx = dic["device"] as PSPDEV; lookUpEdit1.EditValue = dev.SUID; string sql = " where (type ='70') and AreaID='" + devzx.SUID + "'order by number"; IList list = Services.BaseService.GetList("SelectPSPDEVByCondition", sql); lookUpEdit2.Properties.DataSource = list; } }
/// <summary> /// 获取设备对象 /// </summary> /// <typeparam name="type"></typeparam> /// <param name="uid"></param> /// <returns></returns> //根据短路的元件类型 type项目projectSUID和卷项目projectid来获得这个项目的所有元件 public static object SelectProjectDevice(string type, string projectSUID, string projectid, List <eleclass> selshortelement) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.shortflag = true; dlg.ProjectSuid = projectSUID; dlg.shortselelement = selshortelement; dlg.ProjectID = projectid; dlg.InitDeviceType(type); if (dlg.ShowDialog() == DialogResult.OK) { return(dlg.GetSelectedDevice()["device"]); } return(null); }
private void buttonEdit2_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("05", "73"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary <string, object> dic = dlg.GetSelectedDevice(); buttonEdit2.Text = dic["name"].ToString(); dev.JName = dic["id"].ToString(); string sql = "where AreaID='" + dic["id"].ToString() + "' and type='70' ORDER BY Number"; IList <PSPDEV> list = UCDeviceBase.DataService.GetList <PSPDEV>("SelectPSPDEVByCondition", sql); lookUpEdit2.Properties.DataSource = list; } }
public static object SelectDevice(string type, string projectID, IList <object> list) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.ProjectID = projectID; dlg.pspflag = pspflag; dlg.wjghflag = Wjghflag; dlg.wjghuid = wjghuid; dlg.ListUID = list; dlg.InitDeviceType(type); if (dlg.ShowDialog() == DialogResult.OK) { return(dlg.GetSelectedDevice()["device"]); } return(null); }
public static object SelectDevice(string type, string projectID) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.ProjectID = projectID; dlg.pspflag = pspflag; dlg.wjghflag = Wjghflag; dlg.wjghuid = wjghuid; dlg.subflag = subflag; dlg.InitDeviceType(type); dlg.BdzWhere = bdzwhere; if (dlg.ShowDialog() == DialogResult.OK) { return(dlg.GetSelectedDevice()["device"]); } return(null); }
private void lookUpEdit1_Properties_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("01", "74"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary <string, object> dic = dlg.GetSelectedDevice(); lookUpEdit1.EditValue = dic["id"].ToString(); PSPDEV pdv = dic["device"] as PSPDEV; if (pdv.Type == "01") { dev.FirstNode = pdv.Number; } else { dev.FirstNode = pdv.FirstNode; } } }
private void buttonEdit2_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); // dlg.InitDeviceType("05", "07", "54", "55", "56", "57", "62", "63", "64", "70", "71", "73"); dlg.InitDeviceType("05","73"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary<string, object> dic = dlg.GetSelectedDevice(); if (!string.IsNullOrEmpty(dic["id"].ToString())) { if (dic["id"].ToString()==dev.SUID) { MessageBox.Show("����ѡ�Լ���Ϊ����֧·��������ѡ��"); return; } buttonEdit2.Text = dic["name"].ToString(); dev.JName = dic["id"].ToString(); string sql = "where AreaID='" + dic["id"].ToString() + "' and type='70' ORDER BY Number"; IList<PSPDEV> list = UCDeviceBase.DataService.GetList<PSPDEV>("SelectPSPDEVByCondition", sql); lookUpEdit1.Properties.DataSource = list; } } //����·�Ľڵ��� ��Ϊ����·���ڵ� }
private void buttonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); //dlg.InitDeviceType("05","07","54","55","56","57","62","63","64","70","71","73"); dlg.InitDeviceType("01"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary<string, object> dic = dlg.GetSelectedDevice(); buttonEdit1.Text = dic["name"].ToString(); dev.IName = dic["id"].ToString(); } }
private void simpleButton3_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("01"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary<string,object> dic= dlg.GetSelectedDevice(); PSPDEV dev = dic["device"] as PSPDEV; dev.SvgUID = bdz.UID; Services.BaseService.Update<PSPDEV>(dev); freshxl(); } }
private void lookUpEdit1_Properties_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("01","74"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary<string, object> dic = dlg.GetSelectedDevice(); lookUpEdit1.EditValue = dic["id"].ToString(); PSPDEV pdv=dic["device"] as PSPDEV; if (pdv.Type=="01") { dev.FirstNode=pdv.Number; } else{dev.FirstNode=pdv.FirstNode;} } }
private void barButtonItem10_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { TreeListNode tln = treeList1.FocusedNode; frmDeviceSelect dlg = new frmDeviceSelect(); if (tln != null) { DataRow row = (tln.TreeList.GetDataRecordByNode(tln) as DataRowView).Row; Ps_pdtypenode v = DataConverter.RowToObject<Ps_pdtypenode>(row); if (tln.GetValue("devicetype").ToString() == "01") { //adducdevice("73"); //curDevice.Add(); //PSPDEV pd = curDevice.SelectedDevice as PSPDEV; //馈线段记录 dlg.InitDeviceType("01", "73"); } else if (tln.GetValue("devicetype").ToString() == "73") { dlg.InitDeviceType("73", "74", "80", "75"); } else if (tln.GetValue("devicetype").ToString() == "74") { dlg.InitDeviceType("06", "55"); } if (dlg.ShowDialog() == DialogResult.OK) { Dictionary<string, object> dic = dlg.GetSelectedDevice(); PSPDEV devzx = dic["device"] as PSPDEV; //S1 = devzx.SUID; Ps_pdtypenode pn = new Ps_pdtypenode(); pn.title = devzx.Name; pn.pdreltypeid = pdreltypeid; pn.devicetype = devzx.Type; pn.DeviceID = devzx.SUID; if (devzx.Type != "01") { pn.ParentID = tln.GetValue("ID").ToString(); } switch (devzx.Type) { case "73": pn.Code = (tln.Level + 1).ToString() + "1" + (tln.Nodes.Count + 1).ToString(); break; case "74": pn.Code = (tln.Level + 1).ToString() + "2" + (tln.Nodes.Count + 1).ToString(); break; case "80": pn.Code = (tln.Level + 1).ToString() + "3" + (tln.Nodes.Count + 1).ToString(); break; case "75": pn.Code = (tln.Level + 1).ToString() + "5" + (tln.Nodes.Count + 1).ToString(); break; case "06": pn.Code = (tln.Level + 1).ToString() + "4" + (tln.Nodes.Count + 1).ToString(); break; case "55": pn.Code = (tln.Level + 1).ToString() + "6" + (tln.Nodes.Count + 1).ToString(); break; case "01": pn.Code = treeList1.Nodes.Count.ToString(); break; } Services.BaseService.Create<Ps_pdtypenode>(pn); dt.Rows.Add(Itop.Common.DataConverter.ObjectToRow(pn, dt.NewRow())); } } }
private void buttonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("20", "30"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary<string,object> dic = dlg.GetSelectedDevice(); buttonEdit1.Text = dic["name"].ToString(); dev.SvgUID = dic["id"].ToString(); } }
private void barButtonItem10_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { TreeListNode tln = treeList1.FocusedNode; frmDeviceSelect dlg = new frmDeviceSelect(); if (tln != null) { DataRow row = (tln.TreeList.GetDataRecordByNode(tln) as DataRowView).Row; Ps_pdtypenode v = DataConverter.RowToObject <Ps_pdtypenode>(row); if (tln.GetValue("devicetype").ToString() == "01") { //adducdevice("73"); //curDevice.Add(); //PSPDEV pd = curDevice.SelectedDevice as PSPDEV; //馈线段记录 //dlg.InitDeviceType("01", "73"); MsgBox.Show("电源不能添加元件!"); return; } else if (tln.GetValue("devicetype").ToString() == "73") { // dlg.InitDeviceType("73", "74", "80", "75"); dlg.InitDeviceType("74", "80", "75"); } else if (tln.GetValue("devicetype").ToString() == "74") { dlg.InitDeviceType("06", "55"); } if (dlg.ShowDialog() == DialogResult.OK) { Dictionary <string, object> dic = dlg.GetSelectedDevice(); PSPDEV devzx = dic["device"] as PSPDEV; //S1 = devzx.SUID; Ps_pdtypenode pn = new Ps_pdtypenode(); pn.title = devzx.Name; pn.pdreltypeid = pdreltypeid; pn.devicetype = devzx.Type; pn.DeviceID = devzx.SUID; if (devzx.Type != "01") { pn.ParentID = tln.GetValue("ID").ToString(); } switch (devzx.Type) { case "73": pn.Code = (tln.Level + 1).ToString() + "1" + (tln.Nodes.Count + 1).ToString(); break; case "74": pn.Code = (tln.Level + 1).ToString() + "2" + (tln.Nodes.Count + 1).ToString(); break; case "80": pn.Code = (tln.Level + 1).ToString() + "3" + (tln.Nodes.Count + 1).ToString(); break; case "75": pn.Code = (tln.Level + 1).ToString() + "5" + (tln.Nodes.Count + 1).ToString(); break; case "06": pn.Code = (tln.Level + 1).ToString() + "4" + (tln.Nodes.Count + 1).ToString(); break; case "55": pn.Code = (tln.Level + 1).ToString() + "6" + (tln.Nodes.Count + 1).ToString(); break; case "01": pn.Code = treeList1.Nodes.Count.ToString(); break; } Services.BaseService.Create <Ps_pdtypenode>(pn); dt.Rows.Add(Itop.Common.DataConverter.ObjectToRow(pn, dt.NewRow())); } } }
private void buttonEdit2_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("05", "07", "54", "55", "56", "57", "62", "63", "64", "70", "71", "73","74"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary<string, object> dic = dlg.GetSelectedDevice(); buttonEdit2.Text = dic["name"].ToString(); dev.JName = dic["id"].ToString(); } }
private void buttonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("05","73"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary<string, object> dic = dlg.GetSelectedDevice(); buttonEdit1.Text = dic["name"].ToString(); //����ϼ���·�Ľڵ���Ϣ string sql = "where AreaID='" + dic["id"].ToString()+"' and type='70' ORDER BY Number"; IList<PSPDEV> list = UCDeviceBase.DataService.GetList<PSPDEV>("SelectPSPDEVByCondition", sql); lookUpEdit1.Properties.DataSource = list; lookUpEdit2.Properties.DataSource = list; dev.AreaID = dic["id"].ToString(); } }
private void buttonEdit2_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("05","73"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary<string, object> dic = dlg.GetSelectedDevice(); buttonEdit2.Text = dic["name"].ToString(); dev.JName = dic["id"].ToString(); string sql = "where AreaID='" + dic["id"].ToString() + "' and type='70' ORDER BY Number"; IList<PSPDEV> list = UCDeviceBase.DataService.GetList<PSPDEV>("SelectPSPDEVByCondition", sql); lookUpEdit2.Properties.DataSource = list; } }
private void lookUpEdit1_Properties_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("05", "73"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary<string, object> dic = dlg.GetSelectedDevice(); PSPDEV devzx = dic["device"] as PSPDEV; lookUpEdit1.EditValue = dev.SUID; string sql = " where (type ='70') and AreaID='" + devzx.SUID+ "'order by number"; IList list = Services.BaseService.GetList("SelectPSPDEVByCondition", sql); lookUpEdit2.Properties.DataSource = list; } }
private void simpleButton5_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("70", "71", "72", "57", "59", "61", "62", "63", "64"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary<string, object> dic = dlg.GetSelectedDevice(); PSPDEV devzx = dic["device"] as PSPDEV; devzx.AreaID = dev.SUID; Services.BaseService.Update<PSPDEV>(devzx); initList(); } }
private void buttonEdit2_Click(object sender, EventArgs e) { frmDeviceSelect dlg = new frmDeviceSelect(); dlg.InitDeviceType("20","30"); if (dlg.ShowDialog() == DialogResult.OK) { Dictionary<string, object> dic = dlg.GetSelectedDevice(); buttonEdit2.Text = dic["name"].ToString(); dev.SvgUID = dic["id"].ToString(); } }