private void SaveCheckItems(String RegisterNo, int GroupID)
        {
            ItemGroupBusiness   ItemGroups = new ItemGroupBusiness();
            ItemGroupViewEntity ItemGroup  = ItemGroups.GetItemGroup(GroupID);

            if ((ItemGroup != null) && (ItemGroup.ResultMode == "1"))
            {
                return;
            }
            using (ItemResultDataAccess ResultDataAccess = new ItemResultDataAccess()) {
                List <ItemGroupDetailViewEntity> Items = ItemGroups.GetItemGroupDetails(GroupID);
                foreach (ItemGroupDetailViewEntity Item in Items)
                {
                    ItemResultEntity ItemResult = new ItemResultEntity {
                        ID = new ItemResultPK {
                            GroupID    = GroupID,
                            ItemID     = Item.ID.ItemID,
                            RegisterNo = RegisterNo
                        },
                        DeptID = Item.DeptID
                    };
                    ResultDataAccess.SaveItemResult(ItemResult);
                }
            }
        }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        ItemGroupBusiness      Group = new ItemGroupBusiness();
        RepeaterItemCollection Items = CheckedItemRepeater.Items;
        CheckBox chkSelected;
        Literal  lblItemID;
        ItemGroupDetailEntity ItemGroupDetail;
        int ItemID;

        foreach (RepeaterItem Item in Items)
        {
            chkSelected        = (CheckBox)Item.FindControl("chkSelected");
            lblItemID          = (Literal)Item.FindControl("lblItemID");
            ItemID             = Convert.ToInt32(lblItemID.Text);
            ItemGroupDetail    = new ItemGroupDetailEntity();
            ItemGroupDetail.ID = new ItemGroupDetailPK {
                GroupID = GroupID,
                ItemID  = Convert.ToInt32(lblItemID.Text)
            };
            if (chkSelected.Checked)
            {
                Group.SaveItemGroupDetail(ItemGroupDetail);
            }
            if (!chkSelected.Checked)
            {
                Group.DeleteItemGroupDetail(ItemGroupDetail);
            }
        }
        ShowMessage("组合项目检查明细保存成功!");
    }
        /// <summary>
        /// 返回体检人员检查组合项
        /// </summary>
        /// <param name="RegisterNo"></param>
        /// <returns></returns>
        public List <ItemGroupViewEntity> GetCheckedGroups(String RegisterNo)
        {
            ItemGroupBusiness     ItemGroup   = new ItemGroupBusiness();
            GroupResultDataAccess GroupResult = new GroupResultDataAccess();
            var q = from a in ItemGroup.GetItemGroups()
                    join b in GroupResult.GetGroupResults(RegisterNo) on a.GroupID equals b.ID.GroupID
                    select a;

            return(q.ToList());
        }
Beispiel #4
0
 public override void DataBind()
 {
     using (ItemGroupBusiness ItemGroup = new ItemGroupBusiness()) {
         int    RecordCount = 0;
         String GroupName   = txtGroupName.Text;
         ItemGroupRepeater.DataSource = ItemGroup.GetItemGroups(Pager.CurrentPageIndex,
                                                                Pager.PageSize, GroupName, "", out RecordCount);
         Pager.RecordCount = RecordCount;
         base.DataBind();
     }
 }
Beispiel #5
0
 public override void DataBind()
 {
     using (ItemGroupBusiness ItemGroup = new ItemGroupBusiness()) {
         int    RecordCount = 0;
         String SearchKey   = txtName.Text;
         ItemGroupRepeater.DataSource = ItemGroup.GetItemGroups(Pager.CurrentPageIndex, Pager.PageSize,
                                                                SearchKey, ItemGroupSex, out RecordCount);
         Pager.RecordCount = RecordCount;
     }
     base.DataBind();
 }
 public override void DataBind()
 {
     using (ItemGroupBusiness ItemGroup = new ItemGroupBusiness()) {
         int RecordCount = 0;
         ItemGroupRepeater.DataSource = ItemGroup.GetItemGroups(Pager.CurrentPageIndex,
                                                                Pager.PageSize, out RecordCount);
         Pager.RecordCount = RecordCount;
         base.DataBind();
         InitialItemGroup();
     }
 }
Beispiel #7
0
    public List <BarCode> GetBarCodes(String RegisterNo)
    {
        ItemGroupBusiness          ItemGroup = new ItemGroupBusiness();
        List <ItemGroupViewEntity> Groups    = ItemGroup.GetItemGroups();
        var q = from A in m_Registration.GetGroupResults(RegisterNo)
                join B in Groups on A.ID.GroupID equals B.GroupID
                where B.HasBarCode == true
                select new BarCode {
            RegisterNo = A.ID.RegisterNo, GroupName = A.GroupName
        };

        return(q.ToList());
    }
Beispiel #8
0
    public override void DataBind()
    {
        int    RecordCount   = 0;
        int    SelectedIndex = drpCategory.SelectedIndex;
        String SearchKey     = txtName.Text.Trim();
        int    DeptID        = Convert.ToInt32(Request.Params["DeptID"]);

        if (SelectedIndex == 0)
        {
            //团体体检或体检收费

            List <DepartmentGroupViewEntity> DataSource;
            //检索团体体检是否设置了套餐
            using (DepartmentGroupBusiness DeptGroup = new DepartmentGroupBusiness()) {
                DataSource = DeptGroup.GetDepartmentGroups(DeptID);
            }
            //团体客户有体检套餐设置
            if (DataSource.Count > 0)
            {
                PackageRepeater.DataSource = DataSource;
                Pager.RecordCount          = DataSource.Count;
            }
            //团体客户未设置体检套餐
            if (DataSource.Count <= 0)
            {
                using (PackageBusiness Package = new PackageBusiness()) {
                    PackageRepeater.DataSource = Package.GetPackages(Pager.CurrentPageIndex,
                                                                     Pager.PageSize, SearchKey, PackageSex, out RecordCount);;
                    Pager.RecordCount = RecordCount;
                }
            }

            Pager.Visible  = true;
            Pager1.Visible = false;
            Panel.Visible  = false;
        }
        if (SelectedIndex == 1)
        {
            using (ItemGroupBusiness ItemGroup = new ItemGroupBusiness()) {
                ItemGroupRepeater.DataSource = ItemGroup.GetItemGroups(Pager1.CurrentPageIndex, Pager1.PageSize,
                                                                       SearchKey, ItemGroupSex, out RecordCount);
                Pager1.RecordCount = RecordCount;
            }
            Pager.Visible  = false;
            Pager1.Visible = true;
            Panel.Visible  = true;
        }
        base.DataBind();
    }
Beispiel #9
0
    public List <GroupItem> GetGroupItems(String RegisterNo, int PackageID)
    {
        ItemGroupBusiness   ItemGroup   = new ItemGroupBusiness();
        GroupResultBusiness GroupResult = new GroupResultBusiness();
        DepartmentBusiness  Department  = new DepartmentBusiness();
        var q = from a in GroupResult.GetGroupResults(RegisterNo)
                join b in ItemGroup.GetItemGroups() on a.ID.GroupID equals b.GroupID
                join c in Department.GetDepartments() on a.DeptID equals c.DeptID
                select new GroupItem {
            RegisterNo = RegisterNo,
            GroupID    = Convert.ToInt32(c.DeptKind),
            GroupName  = a.GroupName,
            Clinical   = b.Clinical,
            Notice     = b.Notice,
            Price      = b.Price.Value
        };

        q = q.OrderBy(p => p.GroupID);
        return(q.ToList());
    }
    private void InitialItemGroup()
    {
        ItemGroupBusiness Group = new ItemGroupBusiness();
        List <ItemGroupDetailViewEntity> List  = Group.GetItemGroupDetails(GroupID);
        RepeaterItemCollection           Items = CheckedItemRepeater.Items;
        CheckBox chkSelected;
        Literal  lblItemID;
        int      ItemID, Count;

        foreach (RepeaterItem Item in Items)
        {
            chkSelected = (CheckBox)Item.FindControl("chkSelected");
            lblItemID   = (Literal)Item.FindControl("lblItemID");
            ItemID      = Convert.ToInt32(lblItemID.Text);
            Count       = List.Count(p => p.ID.GroupID == GroupID && p.ID.ItemID == ItemID);
            if (Count > 0)
            {
                chkSelected.Checked = true;
            }
        }
    }
Beispiel #11
0
 protected override void OnUnload(EventArgs e)
 {
     m_ItemGroup.Dispose();
     m_ItemGroup = null;
     base.OnUnload(e);
 }
Beispiel #12
0
 protected override void OnInit(EventArgs e)
 {
     m_ItemGroup = new ItemGroupBusiness();
     base.OnInit(e);
 }