private void setXY() { DataRow[] rows = dtLSTIGS.Select("F_FIELD<>'' and F_YHBZ<>'1'", "F_TIBH"); foreach (DataRow row in rows) { if (row["F_TYPE"].ToString() == "C" || row["F_TYPE"].ToString() == "D") { DevExpress.XtraEditors.Controls.RadioGroupItem item = new DevExpress.XtraEditors.Controls.RadioGroupItem(); item.Description = row["F_TEXT"].ToString(); item.Value = row["F_FIELD"].ToString(); radioX.Properties.Items.Add(item); } else { //checkY.Items.Add( DevExpress.XtraEditors.Controls.CheckedListBoxItem item = new DevExpress.XtraEditors.Controls.CheckedListBoxItem(); item.Value = row["F_TEXT"].ToString(); //item.Value = row["F_FIELD"].ToString(); checkY.Items.Add(item); } } if (radioX.Properties.Items.Count > 0) { radioX.SelectedIndex = 0; } if (checkY.Items.Count > 0) { checkY.Items[0].CheckState = CheckState.Checked; } }
/// <summary> /// 绑定RadioGroup组控件的数据源 /// </summary> /// <param name="edit">RadioGroup组控件</param> /// <param name="dataSource">数据源</param> /// <param name="bindField">取值字段</param> public static void BindingRadioEdit(RadioGroup edit, DataTable dataSource, string displayMember, string valueMember) { foreach (DataRow dr in dataSource.Rows) { string strName = ConvertEx.ToString(dr[displayMember]); //获取名称 string strVaule = ConvertEx.ToString(dr[valueMember]); //获取值 DevExpress.XtraEditors.Controls.RadioGroupItem rgItem = new DevExpress.XtraEditors.Controls.RadioGroupItem() { Description = strName, Value = strVaule }; edit.Properties.Items.Add(rgItem); } }
public void InitDamageType() { DataTable dt = null; Result res = ISM.Template.DictUtility.Get(_core.RemoteObject, "PADAMAGETYPE", ref dt); if (ISM.Template.FormUtility.ValidateQuery(res)) { foreach (DataRow r in dt.Rows) { DevExpress.XtraEditors.Controls.RadioGroupItem item = new DevExpress.XtraEditors.Controls.RadioGroupItem(); item.Value = r["DAMAGETYPE"]; item.Description = Static.ToStr(r["NAME"]); radType.Properties.Items.Add(item); } } }
/// <summary> /// Хөнгөлөлт сонгох /// </summary> /// <param name="param">SALESDB,LOYALDB,POINT,REBATEID,LOYALID,POINTID</param> /// <param name="rebateID">Хөнгөлөлтийн дугаар:Cонголт индекс [OUTPUT]</param> public frmRebateOption(object[] param) { InitializeComponent(); string productname = ""; int pindex = 0; DevExpress.XtraEditors.Controls.RadioGroupItem rgi = new DevExpress.XtraEditors.Controls.RadioGroupItem(); foreach (object[] obj in param) { decimal SALESPRICE = 0; decimal TOTALPRICE = 0; DataTable dtSalesDB = (DataTable)obj[0]; DataTable dt = (DataTable)obj[1]; foreach (DataRow dr in dtSalesDB.Rows) { TOTALPRICE = TOTALPRICE + Static.ToDecimal(dr["PRICE"]) * Static.ToDecimal(dr["QUANTITY"]); SALESPRICE = SALESPRICE + Static.ToDecimal(dr["SALESPRICE"]) * Static.ToDecimal(dr["QUANTITY"]); } if (dt != null) { if (dt.Rows.Count != 0) { foreach (DataRow dr in dt.Rows) { productname = productname + "," + dr["PRODNO"]; } } else { productname = "Байхгүй"; } } else { productname = "Байхгүй"; } rgi.Description = string.Format("{0} [Хөн.Дүн: {1}][Урам.Бар: {2}][Оноо: {3}]", obj[3], TOTALPRICE - SALESPRICE, productname, obj[2]); //rgi.Value = string.Format("{0}:{1}", 1, pindex); rgi.Value = string.Format("{0}", pindex); radioGroup1.Properties.Items.Add(rgi); pindex += 1; } radioGroup1.SelectedIndex = 0; }
/// <summary> /// 绑定诊室筛选 /// </summary> /// <param name="dtClinicName"></param> public void ExeBindClinicName(DataTable dtClinicName) { if (rgClinic.Properties.Items.Count > dtClinicName.Rows.Count) { return; } for (int i = 1; i <= dtClinicName.Rows.Count; i++) { DevExpress.XtraEditors.Controls.RadioGroupItem clinicGroup = new DevExpress.XtraEditors.Controls.RadioGroupItem(Convert.ToInt64(dtClinicName.Rows[i - 1]["clinic_id"]), dtClinicName.Rows[i - 1]["clinic_name"].ToString()); this.rgClinic.Properties.Items.Add(clinicGroup); if (i == dtClinicName.Rows.Count) { DevExpress.XtraEditors.Controls.RadioGroupItem clinicGroupAll = new DevExpress.XtraEditors.Controls.RadioGroupItem(Convert.ToInt64(0), "全部"); this.rgClinic.Properties.Items.Add(clinicGroupAll); this.rgClinic.Size = new System.Drawing.Size(90 * (i + 1), 24); break; } } this.groupControl2.Controls.Add(this.rgClinic); }
public void InitList() { try { DataTable dt = new DataTable(); Result res = ISM.Template.DictUtility.Get(_core.RemoteObject, "PLEDGETYPE", 500011, ref dt); if (res != null && res.ResultNo == 0) { foreach (DataRow row in dt.Rows) { DevExpress.XtraEditors.Controls.RadioGroupItem item = new DevExpress.XtraEditors.Controls.RadioGroupItem(); item.Value = row[0]; item.Description = Static.ToStr(row[1]); radType.Properties.Items.Add(item); } } radType.EditValue = _docno; } catch (Exception ex) { } }
private void setChartType() { DevExpress.XtraEditors.Controls.RadioGroupItem item = new DevExpress.XtraEditors.Controls.RadioGroupItem(); item.Description = "曲线图"; item.Value = "line"; radioCharType2D.Properties.Items.Add(item); radioCharType3D.Properties.Items.Add(item); radioCharTypeRadar.Properties.Items.Add(item); item = new DevExpress.XtraEditors.Controls.RadioGroupItem(); item.Description = "折线图"; item.Value = "lineStep"; radioCharType2D.Properties.Items.Add(item); radioCharType3D.Properties.Items.Add(item); item = new DevExpress.XtraEditors.Controls.RadioGroupItem(); item.Description = "柱状图"; item.Value = "bar"; radioCharType2D.Properties.Items.Add(item); radioCharType3D.Properties.Items.Add(item); item = new DevExpress.XtraEditors.Controls.RadioGroupItem(); item.Description = "饼图"; item.Value = "pie"; radioCharType2D.Properties.Items.Add(item); radioCharType3D.Properties.Items.Add(item); item = new DevExpress.XtraEditors.Controls.RadioGroupItem(); item.Description = "点图"; item.Value = "point"; radioCharType2D.Properties.Items.Add(item); radioCharTypeRadar.Properties.Items.Add(item); item = new DevExpress.XtraEditors.Controls.RadioGroupItem(); item.Description = "面积图"; item.Value = "area"; radioCharType2D.Properties.Items.Add(item); radioCharType3D.Properties.Items.Add(item); radioCharTypeRadar.Properties.Items.Add(item); radioCharType2D.SelectedIndex = 0; }
void prodiclist_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e) { #region 动态加载体检项信息采集控件 if (prodiclist.FocusedNode == null) { e.CanFocus = true; return; } prodiclist.Columns["cur_value"].ColumnEdit = null; string cur_value_str = e.Node.GetValue("m_value").ToString(); if (e.Node.GetValue("cur_value").ToString() != "-") { string controltype = e.Node.GetValue("control_type").ToString(); if (controltype == "" || controltype == "1") { //文字类型 或 未知类型 } else if (controltype == "2" || controltype == "3") { //数字类型 2 整合 3 小数 } else if (controltype == "4") { string cur_value_strc = e.Node.GetValue("m_value") + "-" + e.Node.GetValue("cur_value"); #region 单选 rg_cur_value.Properties.Items.Clear(); string contorl_static_str = e.Node.GetValue("contorl_static").ToString(); string[] strs = contorl_static_str.Split('|'); for (int i = 0; i < strs.Length; i++) { string[] element1 = strs[i].Split(','); if (element1.Length > 1) { DevExpress.XtraEditors.Controls.RadioGroupItem item = new DevExpress.XtraEditors.Controls.RadioGroupItem(); item.Description = element1[1]; item.Value = element1[0] + "-" + element1[1]; rg_cur_value.Properties.Items.Add(item); } } rg_cur_value.EditValue = cur_value_strc; prodiclist.Columns["cur_value"].ColumnEdit = ripcrg_cur_value; #endregion } else if (controltype == "5")//多选 { #region 多选控件 string cur_value_strcs = e.Node.GetValue("m_value").ToString(); string cur_value_strc = e.Node.GetValue("cur_value").ToString(); ccbe_cur_value.Items.Clear(); string[] cur_value_strs = cur_value_strcs.Split(','); string[] cur_value_strds = cur_value_strc.Split(','); List <string> ss = new List <string>(); for (int i = 0; i < cur_value_strs.Length; i++) { ss.Add(cur_value_strs[i] + "-" + cur_value_strds[i]); } string contorl_static_str = e.Node.GetValue("contorl_static").ToString(); string[] strs = contorl_static_str.Split('|'); for (int i = 0; i < strs.Length; i++) { string[] element1 = strs[i].Split(','); if (element1.Length > 1) { DevExpress.XtraEditors.Controls.CheckedListBoxItem item = new DevExpress.XtraEditors.Controls.CheckedListBoxItem(); item.Description = element1[1]; item.Value = element1[0] + "-" + element1[1]; if (ss.Contains(element1[0] + "-" + element1[1])) { item.CheckState = CheckState.Checked; } ccbe_cur_value.Items.Add(item); } } prodiclist.Columns["cur_value"].ColumnEdit = pipc_cur_value; #endregion } else if (controltype == "6")//日期 { #region 多选控件 try { prodiclist.Columns["cur_value"].ColumnEdit = ride_value; } catch { } #endregion } } #endregion }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); DevExpress.XtraEditors.Controls.RadioGroupItem radioGroupItem1 = new DevExpress.XtraEditors.Controls.RadioGroupItem(); DevExpress.XtraEditors.Controls.RadioGroupItem radioGroupItem2 = new DevExpress.XtraEditors.Controls.RadioGroupItem(); DevExpress.XtraEditors.Controls.RadioGroupItem radioGroupItem3 = new DevExpress.XtraEditors.Controls.RadioGroupItem(); DevExpress.XtraEditors.Controls.RadioGroupItem radioGroupItem4 = new DevExpress.XtraEditors.Controls.RadioGroupItem(); DevExpress.XtraEditors.Controls.RadioGroupItem radioGroupItem5 = new DevExpress.XtraEditors.Controls.RadioGroupItem(); DevExpress.XtraEditors.Controls.RadioGroupItem radioGroupItem6 = new DevExpress.XtraEditors.Controls.RadioGroupItem(); DevExpress.XtraEditors.Controls.RadioGroupItem radioGroupItem7 = new DevExpress.XtraEditors.Controls.RadioGroupItem(); DevExpress.XtraEditors.Controls.RadioGroupItem radioGroupItem8 = new DevExpress.XtraEditors.Controls.RadioGroupItem(); this.defaultLookAndFeel1 = new DevExpress.LookAndFeel.DefaultLookAndFeel(this.components); this.panel1 = new System.Windows.Forms.Panel(); this.importdev_st = new DevExpress.XtraWizard.WizardControl(); this.selectdev_wiz = new DevExpress.XtraWizard.WelcomeWizardPage(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.radioGroup1 = new DevExpress.XtraEditors.RadioGroup(); this.wizardPage1 = new DevExpress.XtraWizard.WizardPage(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.listBox1 = new System.Windows.Forms.ListBox(); this.completionWizardPage1 = new DevExpress.XtraWizard.CompletionWizardPage(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.textBoxX3 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.wizardPage2 = new DevExpress.XtraWizard.WizardPage(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.importdev_st)).BeginInit(); this.importdev_st.SuspendLayout(); this.selectdev_wiz.SuspendLayout(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.radioGroup1.Properties)).BeginInit(); this.wizardPage1.SuspendLayout(); this.groupBox1.SuspendLayout(); this.completionWizardPage1.SuspendLayout(); this.wizardPage2.SuspendLayout(); this.SuspendLayout(); // // defaultLookAndFeel1 // this.defaultLookAndFeel1.LookAndFeel.SkinName = "iMaginary"; // // panel1 // this.panel1.BackColor = System.Drawing.Color.Transparent; this.panel1.Controls.Add(this.importdev_st); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.ForeColor = System.Drawing.Color.Black; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(625, 396); this.panel1.TabIndex = 0; this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); // // importdev_st // this.importdev_st.Controls.Add(this.selectdev_wiz); this.importdev_st.Controls.Add(this.wizardPage1); this.importdev_st.Controls.Add(this.completionWizardPage1); this.importdev_st.Controls.Add(this.wizardPage2); this.importdev_st.Dock = System.Windows.Forms.DockStyle.Fill; this.importdev_st.Location = new System.Drawing.Point(0, 0); this.importdev_st.LookAndFeel.UseDefaultLookAndFeel = false; this.importdev_st.Name = "importdev_st"; this.importdev_st.Pages.AddRange(new DevExpress.XtraWizard.BaseWizardPage[] { this.selectdev_wiz, this.wizardPage1, this.wizardPage2, this.completionWizardPage1 }); this.importdev_st.Size = new System.Drawing.Size(625, 396); this.importdev_st.Text = "导入硬件到系统"; this.importdev_st.WizardStyle = DevExpress.XtraWizard.WizardStyle.WizardAero; this.importdev_st.FinishClick += new System.ComponentModel.CancelEventHandler(this.importdev_st_FinishClick); this.importdev_st.NextClick += new DevExpress.XtraWizard.WizardCommandButtonClickEventHandler(this.importdev_st_NextClick); // // selectdev_wiz // this.selectdev_wiz.Controls.Add(this.groupBox2); this.selectdev_wiz.Enabled = true; this.selectdev_wiz.Name = "selectdev_wiz"; this.selectdev_wiz.Size = new System.Drawing.Size(565, 228); this.selectdev_wiz.Text = "选择硬件类型"; // // groupBox2 // this.groupBox2.Controls.Add(this.radioGroup1); this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox2.ForeColor = System.Drawing.Color.Black; this.groupBox2.Location = new System.Drawing.Point(0, 0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(565, 228); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "选择类型"; this.groupBox2.CursorChanged += new System.EventHandler(this.groupBox2_CursorChanged); // // radioGroup1 // this.radioGroup1.Dock = System.Windows.Forms.DockStyle.Fill; this.radioGroup1.Location = new System.Drawing.Point(3, 18); this.radioGroup1.Name = "radioGroup1"; // // // this.radioGroup1.Properties.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.radioGroup1.Properties.Appearance.ForeColor = System.Drawing.Color.Black; this.radioGroup1.Properties.Appearance.Options.UseBackColor = true; this.radioGroup1.Properties.Appearance.Options.UseForeColor = true; radioGroupItem1.Description = "扫描枪"; radioGroupItem1.Value = null; radioGroupItem2.Description = "热敏打印机"; radioGroupItem2.Value = null; radioGroupItem3.Description = "卡尺"; radioGroupItem3.Value = null; radioGroupItem4.Description = "高度尺"; radioGroupItem4.Value = null; radioGroupItem5.Description = "千分尺"; radioGroupItem5.Value = null; radioGroupItem6.Description = "角度尺"; radioGroupItem6.Value = null; radioGroupItem7.Description = "百分表"; radioGroupItem7.Value = null; radioGroupItem8.Description = "千分表"; radioGroupItem8.Value = null; this.radioGroup1.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.RadioGroupItem[] { radioGroupItem1, radioGroupItem2, radioGroupItem3, radioGroupItem4, radioGroupItem5, radioGroupItem6, radioGroupItem7, radioGroupItem8 }); this.radioGroup1.Size = new System.Drawing.Size(559, 207); this.radioGroup1.TabIndex = 0; // // wizardPage1 // this.wizardPage1.Controls.Add(this.groupBox1); this.wizardPage1.Enabled = true; this.wizardPage1.Name = "wizardPage1"; this.wizardPage1.Size = new System.Drawing.Size(565, 228); this.wizardPage1.Text = "请选择设备"; // // groupBox1 // this.groupBox1.Controls.Add(this.listBox1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox1.ForeColor = System.Drawing.Color.Black; this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(565, 228); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = "硬件列表"; // // listBox1 // this.listBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.listBox1.ForeColor = System.Drawing.Color.Black; this.listBox1.FormattingEnabled = true; this.listBox1.Items.AddRange(new object[] { "com1", "com2", "com4", "com5", "com6", "com7", "com8", "com9", "com10", "com11", "com12", "com13", "com14", "com15", "com16", "com17", "com18" }); this.listBox1.Location = new System.Drawing.Point(3, 18); this.listBox1.Name = "listBox1"; this.listBox1.Size = new System.Drawing.Size(559, 207); this.listBox1.TabIndex = 0; // // completionWizardPage1 // this.completionWizardPage1.Controls.Add(this.label2); this.completionWizardPage1.Controls.Add(this.label1); this.completionWizardPage1.Controls.Add(this.textBoxX3); this.completionWizardPage1.Controls.Add(this.textBoxX2); this.completionWizardPage1.Enabled = true; this.completionWizardPage1.Name = "completionWizardPage1"; this.completionWizardPage1.Size = new System.Drawing.Size(565, 228); this.completionWizardPage1.Text = "测试成功了!为工具命名昵称,并写明工位"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(16, 137); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(43, 13); this.label2.TabIndex = 3; this.label2.Text = "工位名"; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(16, 68); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(43, 13); this.label1.TabIndex = 2; this.label1.Text = "工具名"; // // textBoxX3 // this.textBoxX3.BackColor = System.Drawing.Color.White; // // // this.textBoxX3.Border.Class = "TextBoxBorder"; this.textBoxX3.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.textBoxX3.DisabledBackColor = System.Drawing.Color.White; this.textBoxX3.ForeColor = System.Drawing.Color.Black; this.textBoxX3.Location = new System.Drawing.Point(77, 133); this.textBoxX3.Name = "textBoxX3"; this.textBoxX3.PreventEnterBeep = true; this.textBoxX3.Size = new System.Drawing.Size(253, 22); this.textBoxX3.TabIndex = 1; // // textBoxX2 // this.textBoxX2.BackColor = System.Drawing.Color.White; // // // this.textBoxX2.Border.Class = "TextBoxBorder"; this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.textBoxX2.DisabledBackColor = System.Drawing.Color.White; this.textBoxX2.ForeColor = System.Drawing.Color.Black; this.textBoxX2.Location = new System.Drawing.Point(77, 64); this.textBoxX2.Name = "textBoxX2"; this.textBoxX2.PreventEnterBeep = true; this.textBoxX2.Size = new System.Drawing.Size(253, 22); this.textBoxX2.TabIndex = 0; // // wizardPage2 // this.wizardPage2.Controls.Add(this.textBoxX1); this.wizardPage2.Enabled = true; this.wizardPage2.Name = "wizardPage2"; this.wizardPage2.Size = new System.Drawing.Size(565, 228); this.wizardPage2.Text = "等待com的测试数据"; // // textBoxX1 // this.textBoxX1.BackColor = System.Drawing.Color.White; // // // this.textBoxX1.Border.Class = "TextBoxBorder"; this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.textBoxX1.DisabledBackColor = System.Drawing.Color.White; this.textBoxX1.ForeColor = System.Drawing.Color.Black; this.textBoxX1.Location = new System.Drawing.Point(3, 62); this.textBoxX1.Name = "textBoxX1"; this.textBoxX1.PreventEnterBeep = true; this.textBoxX1.Size = new System.Drawing.Size(308, 22); this.textBoxX1.TabIndex = 0; this.textBoxX1.Text = "00000011"; // // Devsimport // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(625, 396); this.Controls.Add(this.panel1); this.DoubleBuffered = true; this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.MaximizeBox = false; this.Name = "Devsimport"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "导入"; this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Devsimport_FormClosed); this.Load += new System.EventHandler(this.Devsimport_Load); this.panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.importdev_st)).EndInit(); this.importdev_st.ResumeLayout(false); this.selectdev_wiz.ResumeLayout(false); this.groupBox2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.radioGroup1.Properties)).EndInit(); this.wizardPage1.ResumeLayout(false); this.groupBox1.ResumeLayout(false); this.completionWizardPage1.ResumeLayout(false); this.completionWizardPage1.PerformLayout(); this.wizardPage2.ResumeLayout(false); this.ResumeLayout(false); }