public void ShowDrugDes(XapDataList <EmsOrDrug> drugList) { if (this.panel != null) { this.panel.RemoveRenderAll(); List <XLabel> labelList = new List <XLabel>(); foreach (EmsOrDrug p in drugList) { MedSrvDO md = new GetMedSrvImpl().GetMedSrvById(p.Id_srv); string str = viewModel.GetDrugDes(p.Id_srv); XLabel lbltitle = new XLabel(); lbltitle.Font = new System.Drawing.Font("微软雅黑", 18.75F); lbltitle.ValueText = p.Name_srv + "说明书"; lbltitle.Size = lbltitle.GetPreferredSize(new Size(this.Width - 20, 0)); lbltitle.CanFocus = true; XLabel lblDes = new XLabel(); lblDes.Font = new System.Drawing.Font("微软雅黑", 10.75F); lblDes.ValueText = str; lblDes.Size = lblDes.GetPreferredSize(new Size(this.Width - 20, 0)); lblDes.CanFocus = true; this.panel.AddRender(lbltitle); this.panel.AddRender(lblDes); labelList.Add(lbltitle); labelList.Add(lblDes); } ; ReLocation(labelList); } this.getScrollBarRect(); }
public BdHpIndicationDTOForm(string limit, string name_srv, bool?isDefault) { this.IsShowButton = false; this.StartPosition = FormStartPosition.CenterScreen; this.Formsize = FormSize.Medium; this.Text = "是否为医保适应症"; this.Height = 200; panel = new XAPScrollBarPanel(); panel.Size = this.Panel.Size; panel.Location = this.Panel.Location; this.Panel = panel; centerControl = new XBaseControl(); lblDes = new XLabel(); if (!string.IsNullOrEmpty(limit)) { lblDes.ValueText = limit; } else { lblDes.ValueText = "没有医保适应症限制条件"; } //string strParam = SysParamUtils.getSysParam().SYS_PARAM_HPInfoMode.OrgParam; //if (strParam != null && strParam =="2") // { // lblDes.ValueText = " 医保限制条件 :"+lblDes.ValueText + "\n 院内限制条件:" + hislimit; // } //else if (strParam != null && strParam == "1") // { // lblDes.ValueText = " 院内限制条件:" + hislimit; // } lblDes.Font = new System.Drawing.Font("微软雅黑", 10.75F); lblDes.Size = lblDes.GetPreferredSize(new Size(this.Size.Width - 20, 0)); lblDes.Location = new Point(10, 0); centerControl.Size = new Size(this.Size.Width - this.Padding.Horizontal, lblDes.Size.Height + 10); centerControl.Location = new Point(0, 0); centerControl.AddRender(lblDes); panel.AddRender(centerControl); panel.getScrollBarRect(); saveButton = new XButton { Size = new Size(90, 25), Text = "符合-医保" }; saveButton1 = new XButton { Size = new Size(90, 25), Text = "符合-医保1" }; saveButton2 = new XButton { Size = new Size(90, 25), Text = "符合-医保2" }; cancelButton = new XButton { Size = new Size(90, 25), Text = "不符合-自费" }; saveButton.MouseClick += new MouseEventHandler(saveButton_MouseClick); saveButton1.MouseClick += new MouseEventHandler(saveButton_MouseClick1); saveButton2.MouseClick += new MouseEventHandler(saveButton_MouseClick2); cancelButton.MouseClick += new MouseEventHandler(cancelButton_MouseClick); this.AddRender_Btn(saveButton1, saveButton2, saveButton, cancelButton); // this.AddRender_Btn( saveButton1, saveButton2, cancelButton); if (isDefault != null && (bool)isDefault) { this.MouseButton = saveButton; } else { this.MouseButton = cancelButton; } }