Exemplo n.º 1
0
        ///选择组合项目添加
        protected void DropTest_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (DropTest.SelectedIndex == 0)
            {
                return;
            }
            ExtAspNet.ListItem li = DropTest.SelectedItem;

            //  Dicttestitem itemtest = registerserver.SelectsTestItemListById(Convert.ToDouble(li.Value));

            List <OrderRegister> _gridtestList = GetGridTest(false);
            string msg = registerserver.AddGroupTest(ref _gridtestList, DropSex.SelectedValue, null, Convert.ToDouble(li.Value), false, Userinfo, null, null);

            if (msg != string.Empty)
            {
                MessageBoxShow(msg); return;
            }
            ////校验性别是否符合
            //string str = registerserver.checkSex(itemtest.Dicttestitemid, DropSex.SelectedValue);
            //if (str != string.Empty) { MessageBoxShow(str); return; }

            //bool isNewBarcode = true;
            //string barccode = "";
            //foreach (OrderRegister item in _gridtestList)
            //{
            //    string msg = registerserver.checkInsert(item, itemtest, string.Empty);
            //    //此处判断组合存在,或者项目报告ID不同就不需要允许添加
            //    if (msg != string.Empty) { MessageBoxShow(msg); return; }

            //    //分管原则相同时 没有标本接受时使用以前条码
            //    if ((Convert.ToInt32(item.Status)) < ((int)daan.service.common.ParamStatus.OrderbarcodeStatus.Received) && item.Tubegroup == itemtest.Tubegroup)
            //    {
            //        isNewBarcode = false;
            //        barccode = item.Barcode;
            //    }
            //}
            ////判断使用原条码还是新条码
            //if (isNewBarcode) { barccode = registerserver.GetBarCode(); }

            //OrderRegister newOrderRegister = new OrderRegister();
            //newOrderRegister.Productid = null;
            //newOrderRegister.Productname = null;
            //newOrderRegister.Id = itemtest.Dicttestitemid;
            //newOrderRegister.Code = itemtest.Testcode;
            //newOrderRegister.Name = itemtest.Testname;
            //newOrderRegister.Type = itemtest.Testtype;
            //newOrderRegister.Isadd = "0";
            //newOrderRegister.Isactive = "1";
            //newOrderRegister.Billed = "0";
            //newOrderRegister.Sendbilled = "0";
            //newOrderRegister.Sendoutcustomerid = null;
            //newOrderRegister.Tubegroup = itemtest.Tubegroup;
            //newOrderRegister.Barcode = barccode;

            // _gridtestList.Add(newOrderRegister);
            BindGridTest(_gridtestList);//绑定数据

            DropTest.SelectedItem.Value = "-1";
            tbxItemTest.Text           += li.Text + ",";
        }
Exemplo n.º 2
0
        ///选择套餐添加
        protected void DropItem_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (DropItem.SelectedIndex == 0)
            {
                return;
            }
            ExtAspNet.ListItem li = DropItem.SelectedItem;

            CacheHelper.RemoveAllCache("daan.GetDictproductdetail");
            List <Dictproductdetail> dictproduct = loginservice.GetLoginDictproductdetail();
            List <Dictproductdetail> dictprodu   = (from Dictproductdetail in dictproduct where (Dictproductdetail.Productid == Convert.ToDouble(li.Value)) select Dictproductdetail).ToList <Dictproductdetail>();

            if (dictprodu.Count > 0)
            {
                for (int i = 0; i < dictprodu.Count; i++)
                {
                    Dicttestitem dictestitem = new DicttestitemService().SelectDicttestitemByDicttestitemid(Convert.ToDouble(dictprodu[i].Testgroupid));
                    if (dictestitem != null)
                    {
                        if (dictestitem.Tubegroup == "" || dictestitem.Dictlabdeptid.ToString() == "" || dictestitem.Dictspecimentypeid.ToString() == "")
                        {
                            if (dictestitem.Tubegroup == "")
                            {
                                MessageBoxShow("" + dictestitem.Testname + "分管原则不能为空,请重新维护后再添加!");
                                return;
                            }
                            else if (dictestitem.Dictlabdeptid.ToString() == "")
                            {
                                MessageBoxShow("" + dictestitem.Testname + "所属科室不能为空,请重新维护后再添加!");
                                return;
                            }
                            else if (dictestitem.Dictspecimentypeid.ToString() == "")
                            {
                                MessageBoxShow("" + dictestitem.Testname + "标本类型不能为空,请重新维护后再添加!");
                                return;
                            }
                        }
                    }
                }
            }

            string productname = "";
            List <OrderRegister> _gridtestList = GetGridTest(false);
            string msg = registerserver.AddProduct(ref _gridtestList, DropSex.SelectedValue, Convert.ToDouble(li.Value), false, Userinfo, ref productname, null);

            if (msg != string.Empty)
            {
                MessageBoxShow(msg); return;
            }
            tbxItemTest.Text += productname + ",";
            BindGridTest(_gridtestList);//绑定数据
            //DropItem.SelectedItem.Value = "-1";
        }
Exemplo n.º 3
0
        ///选择套餐添加
        protected void DropItem_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (DropItem.SelectedIndex == 0)
            {
                return;
            }
            ExtAspNet.ListItem li = DropItem.SelectedItem;

            string productname = "";
            List <OrderRegister> _gridtestList = GetGridTest(false);
            string msg = registerserver.AddProduct(ref _gridtestList, tbxSex.Label, Convert.ToDouble(li.Value), true, Userinfo, ref productname, null);

            if (msg != string.Empty)
            {
                MessageBoxShow(msg); return;
            }
            tbxItemTest.Text += productname + ",";
            BindGridTest(_gridtestList);//绑定数据
            DropItem.SelectedItem.Value = "-1";
        }
Exemplo n.º 4
0
        ///选择组合项目添加
        protected void DropTest_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (DropTest.SelectedIndex == 0)
            {
                return;
            }

            ExtAspNet.ListItem   li            = DropTest.SelectedItem;
            List <OrderRegister> _gridtestList = GetGridTest(false);

            Dicttestitem dictestitem = new DicttestitemService().SelectDicttestitemByDicttestitemid(Convert.ToDouble(li.Value.ToString()));

            if (dictestitem != null)
            {
                if (dictestitem.Tubegroup == "" || dictestitem.Dictlabdeptid.ToString() == "" || dictestitem.Dictspecimentypeid.ToString() == "")
                {
                    if (dictestitem.Tubegroup == "")
                    {
                        MessageBoxShow("" + dictestitem.Testname + "分管原则不能为空,请重新维护后再添加!");
                        return;
                    }
                    else if (dictestitem.Dictlabdeptid.ToString() == "")
                    {
                        MessageBoxShow("" + dictestitem.Testname + "所属科室不能为空,请重新维护后再添加!");
                        return;
                    }
                    else if (dictestitem.Dictspecimentypeid.ToString() == "")
                    {
                        MessageBoxShow("" + dictestitem.Testname + "标本类型不能为空,请重新维护后再添加!");
                        return;
                    }
                }
            }
            string msg = registerserver.AddGroupTest(ref _gridtestList, DropSex.SelectedValue, null, Convert.ToDouble(li.Value), false, Userinfo, null, null);

            if (msg != string.Empty)
            {
                MessageBoxShow(msg); return;
            }
            //Dicttestitem itemtest = registerserver.SelectsTestItemListById(Convert.ToDouble(li.Value));
            ////校验性别是否符合
            //string str = registerserver.checkSex(itemtest.Dicttestitemid, DropSex.SelectedValue);
            //if (str != string.Empty) { MessageBoxShow(str); return; }

            //bool isNewBarcode = true;
            //string barccode = "";
            //foreach (OrderRegister item in _gridtestList)
            //{
            //    string msg = registerserver.checkInsert(item, itemtest, string.Empty);
            //    //此处判断组合存在,或者项目报告ID不同就不需要允许添加
            //    if (msg != string.Empty) { MessageBoxShow(msg); return; }

            //    //分管原则相同时 没有标本接受时使用以前条码
            //    if (item.Tubegroup == itemtest.Tubegroup && (Convert.ToInt32(item.Status)) < ((int)daan.service.common.ParamStatus.OrderbarcodeStatus.Received))
            //    {
            //        isNewBarcode = false;
            //        barccode = item.Barcode;
            //    }
            //}

            ////判断使用原条码还是新条码
            //if (isNewBarcode) { barccode = registerserver.GetBarCode(); }

            //OrderRegister newOrderRegister = new OrderRegister();
            //newOrderRegister.Productid = null;
            //newOrderRegister.Productname = null;
            //newOrderRegister.Id = itemtest.Dicttestitemid;
            //newOrderRegister.Code = itemtest.Testcode;
            //newOrderRegister.Name = itemtest.Testname;
            //newOrderRegister.Type = itemtest.Testtype;
            //newOrderRegister.Isadd = PageIsInsert.Readonly ? "1" : "0";
            //if (PageIsInsert.Readonly)
            //{
            //    newOrderRegister.Adduserid = Userinfo.userId;///追加人 取当前用户名,ID
            //    newOrderRegister.Addusername = Userinfo.userName;
            //}
            //newOrderRegister.Isactive = "1";
            //newOrderRegister.Billed = "0";
            //newOrderRegister.Sendbilled = "0";
            //newOrderRegister.Sendoutcustomerid = null;
            //newOrderRegister.Tubegroup = itemtest.Tubegroup;
            //newOrderRegister.Barcode = barccode;
            //_gridtestList.Add(newOrderRegister);
            BindGridTest(_gridtestList);//绑定数据

            tbxItemTest.Text += li.Text + ",";

            //DropTest.SelectedItem.Value = "-1";
            // DropTest.SelectedValue = "-1";
        }