예제 #1
0
파일: New.aspx.cs 프로젝트: liu4434004/EHR2
        private void OnStart()
        {
            if (GroupID == 0)
            {
                G_ParentID_Txt.Text = "部门列表";
            }
            else
            {
                G_ParentID_Txt.Text = BusinessFacade.sys_GroupDisp(GroupID).G_CName;
            }

            CatListTitle.Text = string.Format("<a href='GroupList.aspx'>部门列表</a>{0}", BusinessFacade.GetGroupTitle(GroupID));
            //Button1.Attributes.Add("Onclick", "javascript:return checkForm(aspnetForm);");
        }
예제 #2
0
        private void OnStart()
        {
            int        RecordCount = 0;
            QueryParam qp          = new QueryParam();

            qp.Orderfld  = "G_Level,G_ShowOrder";
            qp.OrderType = 0;
            qp.Where     = string.Format("Where G_ParentID ={0} and G_Delete=0 ", GroupID);
            ArrayList lst = BusinessFacade.sys_GroupList(qp, out RecordCount);

            CatCountTxt.Text = RecordCount.ToString();
            if (GroupID == 0)
            {
                CatNameTxt.Text = "部门列表";
            }
            else
            {
                CatNameTxt.Text = BusinessFacade.sys_GroupDisp(GroupID).G_CName;
            }

            SubGroup.DataSource = lst;
            SubGroup.DataBind();

            CatListTitle.Text = string.Format("<a href='GroupList.aspx'>部门列表</a>{0}", BusinessFacade.GetGroupTitle(GroupID));
        }
예제 #3
0
        private void OnStart()
        {
            int        RecordCount = 0;
            QueryParam qp          = new QueryParam();

            qp.Orderfld  = "G_Level,G_ShowOrder";
            qp.OrderType = 0;
            qp.Where     = string.Format("Where G_ParentID={0} and G_Delete= 0", GroupID);
            ArrayList lst = BusinessFacade.sys_GroupList(qp, out RecordCount);

            OrderByListItems.DataSource     = lst;
            OrderByListItems.DataTextField  = "G_CName";
            OrderByListItems.DataValueField = "GroupID";
            OrderByListItems.DataBind();
            if (lst.Count > 0)
            {
                OrderByListItems.Rows = lst.Count;
            }

            CatListTitle.Text = string.Format("<a href='GroupList.aspx'>部门列表</a>{0}", BusinessFacade.GetGroupTitle(GroupID));
        }
예제 #4
0
        private void OnStart()
        {
            sys_GroupTable gt = BusinessFacade.sys_GroupDisp(GroupID);

            this.G_CName.Text = gt.G_CName;
            if (gt.G_ParentID == 0)
            {
                G_ParentID_Txt.Text = "部门列表";
            }
            else
            {
                G_ParentID_Txt.Text = BusinessFacade.sys_GroupDisp(gt.G_ParentID).G_CName;
            }
            CatListTitle.Text = string.Format("<a href='GroupList.aspx'>部门列表</a>{0}", BusinessFacade.GetGroupTitle(GroupID));
            //判断是否删除
            if (CMD == "Delete")
            {
                FrameWorkPermission.CheckPermissionVoid(PopedomType.Delete);

                //删除子分类
                DeleteCat(GroupID);
                //删除当前分类
                BusinessFacade.Update_Table_Fileds("sys_Group", "G_Delete=1", string.Format("GroupID={0}", GroupID));

                if (gt.G_ParentID != 0)
                {
                    //更新父类子类数
                    BusinessFacade.Update_Table_Fileds("sys_Group", "G_ChildCount=G_ChildCount-1", string.Format("GroupID={0}", gt.G_ParentID));
                    //更新父类子类排序
                    int        RecordCount = 0;
                    QueryParam qp          = new QueryParam();
                    qp.Where     = string.Format("Where G_ParentID={0} and G_Delete=0", gt.G_ParentID);
                    qp.Orderfld  = "G_Level,G_ShowOrder";
                    qp.OrderType = 0;
                    ArrayList lst = BusinessFacade.sys_GroupList(qp, out RecordCount);
                    RecordCount = 1;
                    foreach (sys_GroupTable var in lst)
                    {
                        BusinessFacade.Update_Table_Fileds("sys_Group", string.Format("G_ShowOrder={0}", RecordCount), string.Format("GroupID={0}", var.GroupID));
                        RecordCount++;
                    }
                }
                EventMessage.MessageBox(1, "操作成功", string.Format("删除部门({0})成功!", gt.G_CName), Icon_Type.OK, Common.GetHomeBaseUrl("GroupList.aspx"), Common.BuildJs);
            }
        }