Example #1
0
 /// <summary>
 /// 显示弹出的服务选择对话框
 /// </summary>
 private void ShowForm()
 {
     try
     {
         var pt = this.ParentForm.PointToScreen(new Point(Location.X, Location.Y + Size.Height - 1));
         if (frm == null || !frm.Created)
         {
             frm      = new XContextForm(contentControl);
             frm.Size = new Size(this.ParentForm.Parent.Parent.Size.Width - this.ParentForm.Location.X - 10,
                                 this.ParentForm.Parent.Parent.Size.Height - (this.Size.Height + this.ParentForm.Location.Y) - 10);
             frm.Show(new Rectangle(pt.X, pt.Y, 0, 0));
         }
         else
         {
             if (!frm.Visible)
             {
                 frm.Size = new Size(this.ParentForm.Parent.Parent.Size.Width - this.ParentForm.Location.X - 10,
                                     this.ParentForm.Parent.Parent.Size.Height - (this.Size.Height + this.ParentForm.Location.Y) - 10);
                 frm.Show(new Rectangle(pt.X, pt.Y, 0, 0));
             }
         }
         this.ParentForm.Invalidate();
     }
     catch (Exception e)
     {
         LogManager.GetLogger().ErrorEx("显示服务选择对话框报错", e);
     }
 }
Example #2
0
        /// <summary>
        /// 弹出物品选择器
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="def"></param>
        /// <param name="atPoint"></param>
        private void ShowMmSelector(XDataRow row, List <EmsOrDrug> ds, EmsOrDrug def, Point atPoint, bool canEdit = true)
        {
            var mmContainer = new XBaseControl();

            mmContainer.Size = new Size(473, 160);

            var query = from items in ds orderby items.Fact_count descending select items;

            var mm = new ExtMmRefView(LogicEx.GetInstance().ConvertDataSouse <EmsOrDrug>(query.ToList()), def, false);

            mm.Dock = DockStyle.Fill;
            mmContainer.AddRender(mm);
            var popWindow = new XContextForm(mmContainer);

            mm.Event_SelectChanged += (sender, e) =>
            {
                EmsOrDrug orDrug = EmsHeadDO.Emsdrugs.EmsOrDrugList[gv.FocusedRowHandle];
                var       mmDrug = e.Data as EmsOrDrug;

                if (mmDrug == null)
                {
                    if (orDrug.Fg_self == true)
                    {
                        orDrug.Name_mm = orDrug.Name_srv;
                        orDrug.Id_mm   = null;
                    }
                    popWindow.Close();
                    return;
                }

                #region 皮试逻辑的判断
                if (mmDrug.Fg_skintest != null && mmDrug.Fg_skintest == true)
                {
                    SkinTestLogic logic = new SkinTestLogic(EmsHeadDO.PatInfo);
                    orDrug.Name_mm    = mmDrug.Name_mm;
                    orDrug.Id_mm      = mmDrug.Id_mm;
                    orDrug.Id_srvskin = mmDrug.Id_srvskin;
                    if (logic.skinTestLogic(orDrug).Equals("0"))
                    {
                        popWindow.Close();
                        return;
                    }
                }
                #endregion
                cof.CopyTo(mmDrug, orDrug, "Id_srv", "Name_srv");
                cof.concateMMSpecAndName(orDrug);
                orDrug.Fg_mm = true;
                updateTableCustomerComtrol();
                popWindow.Close();
            };
            popWindow.Show(atPoint);
            mm.Enabled = canEdit;
        }
Example #3
0
        private void InfoButton_MouseClick(object sender, MouseEventArgs e)
        {
            var mmContainer = new XBaseControl()
            {
                Size = new Size(473, 200)
            };

            var ordFeeCollectInfoView = new OrdFeeCollectInfoView(mmContainer, _dataSource["group"] as FArrayList);

            ordFeeCollectInfoView.Dock = DockStyle.Fill;
            ordFeeCollectInfoView.SingleBorderStyle = true;
            mmContainer.AddRender(ordFeeCollectInfoView);
            var popWindow = new XContextForm(mmContainer);
            var pt        = this.ownerView.Location;

            pt.Offset((ownerView.Size.Width - mmContainer.Size.Width) / 2, (RelativeUIParam.ScreenSize != ScreenSize.Large)? -7:22);
            popWindow.Show(ownerView.PointToScreen(pt));
        }