Ejemplo n.º 1
0
        public void BindLabDept()
        {
            DictlabdeptService service     = new DictlabdeptService();
            List <Dictlabdept> listlabdept = loginservice.GetLoginDictlabdeptList();

            ddlgoupLibrary.DataSource     = listlabdept;
            ddlgoupLibrary.DataValueField = "Dictlabdeptid";
            ddlgoupLibrary.DataTextField  = "Labdeptname";
            ddlgoupLibrary.DataBind();
        }
Ejemplo n.º 2
0
        //public List<Dicttestitem> BindTestItemAll()
        //{
        //    List<Dicttestitem> testitemListAll = loginService.GetLoginDicttestitemList();//所有项目
        //    List<Dicttestitem> testitemList = (from Dicttestitem in testitemListAll where Dicttestitem.Testtype == "0" select Dicttestitem).ToList<Dicttestitem>();//所有单项,0,单项
        //    return testitemList;
        //}
        //public List<Dicttestitemresult> BindTestItemResultAll()
        //{
        //    //所有项目结果
        //    List<Dicttestitemresult> testitemresultListAll = loginService.GetLoginDicttestitemresultList();
        //    return testitemresultListAll;
        //}
        #endregion

        #region 绑定物理组
        public void BindLabDept()
        {
            DictlabdeptService service = new DictlabdeptService();

            ddlgoupLibrary.Items.Add(new ExtAspNet.ListItem("请选择", "-1"));
            List <Dictlabdept> listlabdept = loginService.GetLoginDictlabdeptList();

            foreach (Dictlabdept lab in listlabdept)
            {
                ddlgoupLibrary.Items.Add(new ExtAspNet.ListItem(lab.Labdeptname, lab.Dictlabdeptid.ToString()));
                ddlPhysicalGourp.Items.Add(new ExtAspNet.ListItem(lab.Labdeptname, lab.Dictlabdeptid.ToString()));
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 绑定分点列表
        /// </summary>
        private void BindGridLabTo() //分点列表
        {
            try
            {
                //分页查询条件
                PageUtil  pageUtil = new PageUtil(gdLabItem.PageIndex, gdLabItem.PageSize);
                Hashtable ht1      = new Hashtable();
                //ht1.Add("Userid", DictUserId);
                ht1.Add("pageStart", pageUtil.GetPageStartNum()); //pageUtil.GetPageStartNum()
                ht1.Add("pageEnd", pageUtil.GetPageEndNum());     // pageUtil.GetPageEndNum()
                //设置总项数
                gdLabItem.RecordCount = new DictlabService().GetDictlabPageLstCount(ht1);
                gdLabItem.DataSource  = new DictlabService().GetDictlabPageLst(ht1);

                List <Dictlabdept> dictlabdep = new DictlabdeptService().GetDictlabdeptPageLstUser(ht1).ToList();
                //double userId = 0;
                //if (gvList.SelectedRowIndexArray.Length > 0)
                //{
                //    object[] objValue = gvList.DataKeys[gvList.SelectedRowIndexArray[0]];
                //    userId = TypeParse.StrToDouble(objValue[0], 0);
                //}

                //全部列表
                List <Dictlab> labLst = new DictlabService().GetDictlabPageLst(ht1).ToList <Dictlab>();
                Hashtable      ht2    = new Hashtable();
                ht2.Add("Userid", DictUserId);
                ht2.Add("pageStart", pageUtil.GetPageStartNum());
                ht2.Add("pageEnd", pageUtil.GetPageEndNum());
                IList <Dictuserandlab> dictlabList = new DictuserlabService().GetDictuserandlabPageLst(ht2);
                gdLabItem.DataBind();
                int[] labArray = new int[dictlabList.Count];
                if (dictlabList.Count != 0)
                {
                    int index = 0;
                    foreach (Dictuserandlab item in dictlabList)
                    {
                        labArray[index] = labLst.IndexOf(labLst.Find(lab => lab.Dictlabid == item.Dictlabid));
                        index++;
                    }
                    gdLabItem.SelectedRowIndexArray = labArray;
                }
                else
                {
                    gdLabItem.SelectedRowIndexArray = new int[] { };
                }
            }
            catch (Exception ex)
            {
                MessageBoxShow(ex.Message, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 4
0
 //保存数据的逻辑
 public bool SaveDictlibrary()
 {
     try
     {
         dictlabdep = new Dictlabdept();
         if (gvList.SelectedRowIndexArray.Length > 0)
         {
             object[] objValue = gvList.DataKeys[gvList.SelectedRowIndexArray[0]];
             dictlabdep.Dictlabdeptid = TypeParse.StrToDouble(objValue[0], 0);
         }
         if (this.tbxLabdeptname.Text.Trim() != "")
         {
             dictlabdep.Labdeptname = this.tbxLabdeptname.Text.Trim();
         }
         else
         {
             erreyType = "科室名称不能为空!";
             return(false);
         }
         if (this.Drop_LabdeptTyped.SelectedValue != "-1")
         {
             dictlabdep.Labdepttype = this.Drop_LabdeptTyped.SelectedValue;
         }
         else
         {
             erreyType = "科室类型不能为空!";
             return(false);
         }
         if (dictlabdep.Dictlabdeptid == 0 || dictlabdep.Dictlabdeptid == null)
         {
             dictlabdep.Createdate = DateTime.Now;
         }
         else
         {
             Dictlabdept dictdepback = new DictlabdeptService().GetDictlabdeptInfo(dictlabdep);
             dictlabdep.Createdate = dictdepback.Createdate;
         }
         return(dictlabedpService.SaveDictlabdept(dictlabdep));
     }
     catch (Exception ex)
     {
         MessageBoxShow(ex.Message, MessageBoxIcon.Error);
         return(false);
     }
 }
Ejemplo n.º 5
0
        //public List<Dicttestitem> BindTestGourp()
        //{
        //    List<Dicttestitem> testitemListAll = loginservice.GetLoginDicttestitemList();
        //    //绑定组合
        //    List<Dicttestitem> testitemgoutpLst = (from Dicttestitem in testitemListAll where Dicttestitem.Testtype == "1" select Dicttestitem).ToList<Dicttestitem>();
        //    return testitemgoutpLst;
        //}

        //public List<Dicttestitem> BindTestItem()
        //{
        //    List<Dicttestitem> testitemListAll = loginservice.GetLoginDicttestitemList();
        //    //绑定所有单项
        //    List<Dicttestitem> testitemLst = (from Dicttestitem in testitemListAll where Dicttestitem.Testtype == "0" select Dicttestitem).ToList<Dicttestitem>();
        //    return testitemLst;
        //}

        ////组合明细
        //public List<Dicttestgroupdetail> BindtestgroupdetailAll()
        //{
        //    List<Dicttestgroupdetail> testgroupdetailLisAll = loginservice.GetLoginDicttestgroupdetail();
        //    return testgroupdetailLisAll;
        //}
        #endregion

        #region 绑定物理组
        public void BindLabDept()
        {
            DictlabdeptService service = new DictlabdeptService();

            //ddlPhysicalGourp.Items.Add(new ExtAspNet.ListItem("请选择", "-1"));
            ddlgoupLibrary.Items.Add(new ExtAspNet.ListItem("请选择", "-1"));
            List <Dictlabdept> listlabdept = loginservice.GetLoginDictlabdeptList();

            foreach (Dictlabdept lab in listlabdept)
            {
                ddlgoupLibrary.Items.Add(new ExtAspNet.ListItem(lab.Labdeptname, lab.Dictlabdeptid.ToString()));
                ddlPhysicalGourp.Items.Add(new ExtAspNet.ListItem(lab.Labdeptname, lab.Dictlabdeptid.ToString()));
            }

            ddlPhysicalGourp.Items.Insert(0, new ExtAspNet.ListItem("请选择", "-1"));
            DDLLabraryItemBinder(ddlTubeGroup, "TUBEGROUPTYPE");//分管原则
            ddlTubeGroup.Items.Insert(0, new ExtAspNet.ListItem("请选择", "-1"));
        }