Example #1
0
 /// <summary>
 /// 根据用户登陆名,获取用户资料
 /// </summary>
 /// <param name="u_LoginName">用户名</param>
 /// <returns>用户实体类</returns>
 public static sys_UserTable Get_sys_UserTable(string u_LoginName)
 {
     QueryParam qp = new QueryParam();
     qp.Where = string.Format(" Where U_LoginName='{0}' ",u_LoginName);
     int rInt = 0;
     return BusinessFacade.sys_UserList(qp,out rInt)[0] as sys_UserTable;
 }
Example #2
0
        private void OnStart()
        {
            QueryParam qp = new QueryParam();
            qp.Orderfld = " M_Applicationid,M_OrderLevel ";
            qp.OrderType = 0;
            qp.Where = Common.ApplicationID != 0 ? string.Format("Where M_Close=0 and M_ParentID=0 and M_ApplicationID ={0}", Common.ApplicationID) : "Where M_Close=0 and M_ParentID=0 ";
            int RecordCount = 0;
            ArrayList lst = BusinessFacade.sys_ModuleList(qp, out RecordCount);
            int i = 1;
            foreach (sys_ModuleTable var in lst)
            {
                ArrayList lst2 = BusinessFacade.GetPermissionModuleSub(var.ModuleID);//5*1*a*s*p*x
                if (lst2.Count > 0)
                {
                    if (i == 1)
                        sb_FramesetRows.Append("21,*");
                    else
                        sb_FramesetRows.Append(",21,0");

                    sb_HTMLSrc.AppendFormat("<frame name={0}menubarbutton_{1}{0} target={0}pagemain{0} scrolling={0}no{0} noresize src={0}Menu1_Button.aspx?APCatalogueID={1}&OrderNo={2}&APCatCName={3}{0}>{4}<frame name={0}menubar_{1}{0} target={0}pagemain{0} scrolling={0}auto{0} noresize src={0}Menu1_Disp.aspx?ModuleID={5}&OrderNo={2}{0} STYLE={0}border-width:1; border-bottom-style:solid{0}>{4}", "\"", var.ModuleID, i, var.M_CName, "\n",var.ModuleID);

                    i++;
                }
            }

        }
Example #3
0
 public string GetSubCount(string F_Key)
 {
     QueryParam qp = new QueryParam();
     qp.Where = string.Format("Where V_F_Key='{0}'", Common.inSQL(F_Key));
     int RecordCount = 0;
     BusinessFacade.sys_FieldValueList(qp, out RecordCount);
     return RecordCount.ToString();
 }
Example #4
0
 public int GetCatCount(int ApplicationID)
 {
     QueryParam qp = new QueryParam();
     qp.Orderfld = " M_OrderLevel ";
     qp.OrderType = 0;
     qp.Where = string.Format("Where M_ApplicationID ={0} and M_ParentID=0 ", ApplicationID);
     int RecordCount = 0;
     ArrayList lst = BusinessFacade.sys_ModuleList(qp, out RecordCount);
     return RecordCount;
 }
Example #5
0
 /// <summary>
 /// 返回sys_ApplicationsTable实体类的ArrayList对象
 /// </summary>
 /// <param name="qp">查询类</param>
 /// <param name="RecordCount">返回记录总数</param>
 /// <returns>sys_ApplicationsTable实体类的ArrayList对象</returns>
 public static ArrayList sys_ApplicationsList(QueryParam qp, out int RecordCount)
 {
     qp.TableName = "sys_Applications";
     qp.ReturnFields = "*";
     if (qp.Orderfld == null)
     {
         qp.Orderfld = "ApplicationID";
     }
     return DataProvider.Instance().sys_ApplicationsList(qp, out RecordCount);
 }
 /// <summary>
 /// 绑定数据
 /// </summary>
 private void OnDisp()
 {
     QueryParam qp = new QueryParam();
     qp.Orderfld = " M_Applicationid,M_OrderLevel ";
     qp.OrderType = 0;
     qp.Where = string.Format("Where M_Close=0 and M_ParentID=0 and M_ApplicationID ={0}", ApplicationID);
     int RecordCount = 0;
     ArrayList lst = BusinessFacade.sys_ModuleList(qp, out RecordCount);
     Module_Main.DataSource = lst;
     Module_Main.DataBind();
 }
Example #7
0
 /// <summary>
 /// 绑定主菜单
 /// </summary>
 private void BindMenu()
 {
     QueryParam qp = new QueryParam();
     qp.Orderfld = " M_Applicationid,M_OrderLevel ";
     qp.OrderType = 0;
     qp.Where = Common.ApplicationID != 0 ? string.Format("Where M_Close=0 and M_ParentID=0 and M_ApplicationID ={0}", Common.ApplicationID) : "Where M_Close=0 and M_ParentID=0 ";
     int RecordCount = 0;
     ArrayList lst = BusinessFacade.sys_ModuleList(qp, out RecordCount);
     LeftMenu.DataSource = lst;
     LeftMenu.DataBind();
 }
Example #8
0
 private void BindE_ApplicationID()
 {
     QueryParam qp = new QueryParam();
     qp.OrderType = 0;
     int RecordCount = 0;
     ArrayList lst = BusinessFacade.sys_ApplicationsList(qp, out RecordCount);
     E_ApplicationID.DataTextField = "A_AppName";
     E_ApplicationID.DataValueField = "ApplicationID";
     E_ApplicationID.DataSource = lst;
     E_ApplicationID.DataBind();
     E_ApplicationID.Items.Insert(0, new ListItem("²»ÏÞ", ""));
 }
Example #9
0
 private void ListBind()
 {
     QueryParam qp = new QueryParam();
     qp.OrderType = 0;
     qp.PageIndex = Pager.CurrentPageIndex;
     qp.PageSize = Pager.PageSize;
     int RecordCount = 0;
     ArrayList lst = BusinessFacade.PM_ProjectsList(qp, out RecordCount);
     GridView1.DataSource = lst;
     GridView1.DataBind();
     this.Pager.RecordCount = RecordCount;
 }
Example #10
0
 private void ListBind()
 {
     QueryParam qp = new QueryParam();
     qp.OrderType = 0;
     qp.PageIndex = AspNetPager1.CurrentPageIndex;
     qp.PageSize = AspNetPager1.PageSize;
     int RecordCount = 0;
     ArrayList lst = BusinessFacade.sys_FieldList(qp, out RecordCount);
     GridView1.DataSource = lst;
     GridView1.DataBind();
     this.AspNetPager1.RecordCount = RecordCount;
 }
Example #11
0
        private void OutJs()
        {
            int TotalRecord = 0;
            string strLink = "";
            int intCount = 0;
            QueryParam qp = new QueryParam();
            qp.Where = "Where G_Delete=0";
            qp.Orderfld = "G_Level,G_ShowOrder";
            qp.OrderType = 0;
            ArrayList lst = BusinessFacade.sys_GroupList(qp, out TotalRecord);
            StringBuilder strSB = new StringBuilder();

            strSB.Append("<script language='JavaScript'>\n");
            strSB.Append("Fold_id='';\n");

            strSB.Append("treeRoot = gFld(\"mainbody\", \"╡©цеап╠М\", \"0\",\"0\")\n");

            foreach (sys_GroupTable x in lst)
            {
                intCount = intCount + 1;
                //strLink = "GroupList.aspx?GroupID=" + x.GroupID.ToString();
                strLink = x.GroupID.ToString();
                if (x.G_Level == 1)
                {
                    if (x.G_ChildCount == 0)
                    {

                        strSB.AppendFormat("insDoc(treeRoot,gLnk(\"mainbody\",\"{0}\",\"\",{1}))\n", Common.ReplaceJs(x.G_CName), strLink);
                    }
                    else
                    {
                        strSB.AppendFormat("N{0}=insFld(treeRoot,gFld(\"mainbody\",\"{1}\",\"\",{2}))\n", x.GroupID, Common.ReplaceJs(x.G_CName), strLink);
                    }
                }
                else
                {
                    if (x.G_ChildCount == 0)
                    {
                        strSB.AppendFormat("insDoc(N{0},gLnk(\"mainbody\",\"{1}\",\"\",{2}))\n", x.G_ParentID, Common.ReplaceJs(x.G_CName), strLink);
                    }
                    else
                    {
                        strSB.AppendFormat("N{0}=insFld(N{1},gFld(\"mainbody\",\"{2}\",\"\",{3}))\n", x.GroupID, x.G_ParentID, Common.ReplaceJs(x.G_CName), strLink);
                    }
                }

            }

            strSB.Append("	initializeDocument();\n");
            strSB.Append("</script>\n");
            ShowScript.Text = strSB.ToString();
        }
Example #12
0
 private void BindData()
 {
     QueryParam qp = new QueryParam();
     qp.Where = SearchTerms;
     qp.PageIndex = AspNetPager1.CurrentPageIndex;
     qp.PageSize = AspNetPager1.PageSize;
     qp.Orderfld = Orderfld;
     qp.OrderType = OrderType;
     int RecordCount = 0;
     ArrayList lst = BusinessFacade.sys_UserList(qp, out RecordCount);
     GridView1.DataSource = lst;
     GridView1.DataBind();
     this.AspNetPager1.RecordCount = RecordCount;
 }
Example #13
0
        private void OnStart()
        {
            if (CMD != "Look")
            {
                TabOptionItem2.Visible = false;
                TabOptionItem3.Visible = false;
                TabOptionItem4.Visible = false;
                tr_username.Visible = false;
            }
            else {

                if (!FrameWorkPermission.CheckButtonPermission(PopedomType.New))
                    TabOptionItem3.Visible = false;
                //绑定应用列表
                int Recordcount=0;
                QueryParam qp = new QueryParam();
                qp.Where = string.Format("Where A_RoleID = {0}",RoleID);
                qp.OrderType = 0;
                ArrayList lst = BusinessFacade.sys_RoleApplicationList(qp, out Recordcount);
                Repeater1.DataSource = lst;
                Repeater1.DataBind();

                QueryParam qp1 = new QueryParam();
                qp1.OrderType = 0;
                ArrayList lst1 = BusinessFacade.sys_ApplicationsList(qp1, out Recordcount);
                NewAppID.DataSource = lst1;
                NewAppID.DataTextField = "A_AppName";
                NewAppID.DataValueField = "ApplicationID";
                NewAppID.DataBind();
                foreach (sys_RoleApplicationTable var in lst)
                {
                    ListItem ditem1 = this.NewAppID.Items.FindByValue(var.A_ApplicationID.ToString());
                    if (ditem1 != null)
                        NewAppID.Items.Remove(ditem1);
                }

                ListItem item3 = new ListItem();
                item3.Text = "请选择应用";
                item3.Value = "";
                NewAppID.Items.Insert(0, item3);

                BindUserList();
            }

            InputData();

            //Button1.Attributes.Add("Onclick", "javascript:return checkForm(aspnetForm);");
            //Button2.Attributes.Add("Onclick", "javascript:return checkForm(aspnetForm);");
        }
Example #14
0
 /// <summary>
 /// 根据ID返回 sys_ApplicationsTable实体类 单笔资料
 /// </summary>
 /// <param name="ApplicationID">自动ID 1:为系统管理应用</param>
 /// <returns>返回sys_ApplicationsTable实体类 ApplicationID为0则无记录</returns>
 public static sys_ApplicationsTable sys_ApplicationsDisp(int ApplicationID)
 {
     sys_ApplicationsTable fam = new sys_ApplicationsTable();
     QueryParam qp = new QueryParam();
     qp.PageIndex = 1;
     qp.PageSize = 1;
     qp.Where = " Where sys_Applications.ApplicationID = " + ApplicationID;
     int RecordCount = 0;
     ArrayList lst = sys_ApplicationsList(qp, out RecordCount);
     if (RecordCount > 0)
     {
         fam = (sys_ApplicationsTable)lst[0];
     }
     return fam;
 }
Example #15
0
        protected void BindDataList()
        {

            QueryParam qp = new QueryParam();
            qp.Where = string.Format(" Where E_U_LoginName='{0}' and E_Type=2",UserData.GetUserDate.U_LoginName);
            qp.PageIndex = AspNetPager1.CurrentPageIndex;
            qp.PageSize = AspNetPager1.PageSize;
            qp.Orderfld = Orderfld;
            qp.OrderType = OrderType;
            int RecordCount = 0;
            ArrayList lst = BusinessFacade.sys_EventList(qp, out RecordCount);
            GridView1.DataSource = lst;
            GridView1.DataBind();
            this.AspNetPager1.RecordCount = RecordCount;
        }
Example #16
0
        /// <summary>
        /// 构造函数
        /// </summary>
        static FrameSystemInfo()
        {
            if (GetSystemInfoTable == null)
            {
                sys_SystemInfoTable si = new sys_SystemInfoTable();
                QueryParam qp = new QueryParam();
                qp.PageIndex = 1;
                qp.PageSize = 1;
                qp.OrderType = 0;
                int Recount = 0;

                ArrayList lst = BusinessFacade.sys_SystemInfoList(qp, out Recount);
                if (Recount == 0)
                {
                    si.DB_Option_Action_ = "Insert";
                    si.SystemID = BusinessFacade.sys_SystemInfoInsertUpdate(si);
                }
                else
                {
                    si = lst[0] as sys_SystemInfoTable;
                    //更新新加配置
                    sys_ConfigDataTable sys_ConfigDB = si.S_SystemConfigData;
                    sys_ConfigDataTable sys_Config = new sys_ConfigDataTable();
                    //foreach (PropertyInfo pi in new sys_ConfigDataTable().GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
                    foreach (PropertyInfo pi in sys_ConfigDB.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
                    {
                        if (pi.GetValue(sys_ConfigDB, null) == null)
                        {
                            pi.SetValue(sys_ConfigDB, pi.GetValue(sys_Config, null), null);
                        }
                    }

                    //从Dll中更新版本
                    //sys_FrameWorkInfoTable sys_Db = si.S_FrameWorkInfo;
                    //sys_FrameWorkInfoTable sys_Dll = new sys_FrameWorkInfoTable();
                    //foreach (PropertyInfo pi in sys_Db.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
                    //{
                    //    if (pi.Name != "S_Licensed")
                    //    {
                    //        pi.SetValue(sys_Db, pi.GetValue(sys_Dll, null), null);
                    //    }
                    //}
                }
                GetSystemInfoTable = si;
            }
            FrameWorkPermission.InitStat = true;
        }
Example #17
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);

            }
        }
Example #18
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));

        }
Example #19
0
        private void BindUserList()
        {
            QueryParam qp = new QueryParam();
            qp.OrderType = 0;
            int RecordCount = 0;
            ArrayList lst = BusinessFacade.sys_UserList(qp, out RecordCount);
            string stringDel = "";
            foreach (sys_UserTable var in lst)
            {
                stringDel = "";
                if (var.U_Status == 2)
                {
                    stringDel = "¼ºÉ¾³ý";
                }
                E_UserID.Items.Add(new ListItem(var.U_LoginName + "(" + var.U_CName + ")" + stringDel, var.UserID.ToString()));
            }

            E_UserID.Items.Insert(0,new ListItem("²»ÏÞ", ""));
        }
Example #20
0
        private void OnStart()
        {
            QueryParam qp = new QueryParam();
            qp.Orderfld = " M_Applicationid,M_OrderLevel ";
            qp.OrderType = 0;
            qp.Where = Common.ApplicationID != 0 ? string.Format("Where M_Close=0 and M_ParentID=0 and M_ApplicationID ={0}", Common.ApplicationID) : "Where M_Close=0 and M_ParentID=0 ";
            int RecordCount = 0;
            ArrayList lst = BusinessFacade.sys_ModuleList(qp, out RecordCount);
            int i = 1;
            int j ;
            foreach (sys_ModuleTable var in lst)
            {
                ArrayList lst2 = BusinessFacade.GetPermissionModuleSub(var.ModuleID);
                if (lst2.Count > 0)
                {
                    sb_TopHTMLSrc.AppendFormat("<td width='90' align='center' valign='bottom' OnMouseOver={1}javascript:ImageOverOROut('menu_{0}','v'){1} OnMouseOut={1}javascript:ImageOverOROut('menu_{0}','o'){1} class='topmenuoff' id='menu_{0}' OnClick={1}javascript:NowShow('menu_',{0}){1}>{2}</td><td valign='bottom' align='center'><img border='0' src='images/index/top-2-2.gif' width='3' height='20'></td>",i,"\"",var.M_CName);
                    sb_TopHTMLSrc2.AppendFormat("<td height='7' align='center'><img border='0' src='images/index/top-b-1.gif' id='menu_{0}i'></td><td height='7'></td>",i);
                    
                    sb_DownHTMLSrc.AppendFormat("<table border='0' cellpadding='0' cellspacing='0' style={0}display:'none';position: absolute;left: 117px{0} align='left' id='menu_{1}_table'><tr><td align='right'><img border='0' src='images/index/top-b4-1.gif' width='5'></td>","\"",i);

                    j = 1;
                    foreach (sys_ModuleTable var2 in lst2)
                    {
                        sb_DownHTMLSrc.AppendFormat("<td background={0}images/index/top-b4-b.gif{0} align={0}center{0} width={0}92{0} class={0}topmenuoff2{0} id={0}menu_{1}_{2}{0} OnMouseOver={0}javascript:xImageOverOROut('menu_{1}_{2}','v'){0} OnMouseOut={0}javascript:xImageOverOROut('menu_{1}_{2}','o'){0} OnClick={0}javascript:xNowShow('menu_{1}_{2}','{3}'){0}>&nbsp;&nbsp;{4}&nbsp;&nbsp;</td>","\"",i,j,var2.M_Directory.Replace("\\","\\\\"),var2.M_CName);
                        sb_DownHTMLSrc.Append("\n");
                        if (j != lst2.Count)
                            sb_DownHTMLSrc.AppendFormat("<td background={0}images/index/top-b4-b.gif{0}><img border={0}0{0} src={0}images/index/top-b4-c.gif{0} width={0}1{0} height={0}19{0}></td>","\"");
                        j++;
                    }
                    if (j < i)
                    {
                        sb_DownHTMLSrc.AppendFormat("<td background={0}images/index/top-b4-b.gif{0}><img border={0}0{0} src={0}images/index/top-b4-c.gif{0} width={0}1{0} height={0}19{0}></td>", "\"");
                        for (int x = -1; x < i-j; x++)
                        {
                            sb_DownHTMLSrc.AppendFormat("<td background={0}images/index/top-b4-b.gif{0} width={0}1{0}></td><td background={0}images/index/top-b4-b.gif{0} align={0}center{0} width={0}92{0} class={0}topmenuoff2{0}>&nbsp;&nbsp;&nbsp;&nbsp;</td>","\"");
                        }
                    }
                    sb_DownHTMLSrc.Append("<td><img border='0' src='images/index/top-b4-2.gif' width='5'></td><td></td></tr></table>");
                    i++;
                    TopMenuCount++;
                }
            }
        }
Example #21
0
        /// <summary>
        /// 绑定主菜单
        /// </summary>
        private void BindMenu()
        {
            QueryParam qp = new QueryParam();
            qp.Orderfld = " M_Applicationid,M_OrderLevel ";
            qp.OrderType = 0;
            qp.Where = string.Format("Where M_ParentID=0 and M_ApplicationID ={0}", S_ID);
            int RecordCount = 0;
            ArrayList lst = BusinessFacade.sys_ModuleList(qp, out RecordCount);

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

            //绑定排序
            OrderByListItems.DataSource = lst;
            OrderByListItems.DataTextField = "M_CName";
            OrderByListItems.DataValueField = "ModuleID";
            OrderByListItems.DataBind();
            if (lst.Count>0)
                OrderByListItems.Rows = lst.Count;
        }
Example #22
0
        private void OnStart()
        {

            Button2.Attributes.Add("onclick","return doConfirm(this.form);");

            if (CMD == "OrderBy")
            {
                Table_OrderBy_FieldValue.Visible = true;
                string F_Key = (string)Common.sink("F_Key", MethodType.Get, 50, 1, DataType.CharAndNum);
                QueryParam qp = new QueryParam();
                qp.Where = string.Format("where V_F_Key = '{0}'", Common.inSQL(F_Key));
                qp.Orderfld = " V_ShowOrder ";
                qp.OrderType = 0;
                int RecordCount = 0;
                ArrayList lst = BusinessFacade.sys_FieldValueList(qp, out RecordCount);
                OrderByListItems.DataTextField = "V_Text";
                OrderByListItems.DataValueField = "ValueID";
                OrderByListItems.DataSource = lst;
                OrderByListItems.DataBind();

                Button3.OnClientClick = string.Format("selectAll({0})", OrderByListItems.UniqueID);


            }
            else
            {
                int FieldID = (int)Common.sink("FieldID", MethodType.Get, 255, 1, DataType.Int);
                sys_FieldTable ft = BusinessFacade.sys_FieldDisp(FieldID);
                F_Key.Text = ft.F_Key;
                F_CName.Text = ft.F_CName;
                Table_Manager_FieldValue.Visible = true;
                if (CMD == "Edit")
                {
                    int ValueID = (int)Common.sink("ValueID", MethodType.Get, 255, 1, DataType.Int);
                    V_Text_Input.Text = BusinessFacade.sys_FieldValueDisp(ValueID).V_Text;
                    V_Code_Input.Text = BusinessFacade.sys_FieldValueDisp(ValueID).V_Code;
                }
                else
                    Button2.Visible = false;
            }
        }
Example #23
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));
        }
Example #24
0
        /// <summary>
        /// 绑定子菜单事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void LeftMenu_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            
            sys_ModuleTable s_Mt= (sys_ModuleTable)e.Item.DataItem;

            QueryParam qp = new QueryParam();
            qp.Orderfld = " M_OrderLevel ";
            qp.OrderType = 0;
            qp.Where =  string.Format("Where M_Close=0 and M_ParentID ={0}",s_Mt.ModuleID);
            int RecordCount = 0;
            ArrayList lst = BusinessFacade.sys_ModuleList(qp, out RecordCount);
            BusinessFacade.Remove_MenuNoPermission(lst);
            if (lst.Count > 0)
            {
                Repeater LeftSubID = (Repeater)e.Item.FindControl("LeftMenu_Sub");
                LeftSubID.DataSource = lst;
                LeftSubID.DataBind();
            }
            else {
                e.Item.Visible = false;
            }

        }
Example #25
0
        private void OnStart()
        {

            sys_FieldTable Ft = BusinessFacade.sys_FieldDisp(FieldID);
            F_Key_Txt.Text = Ft.F_Key;
            F_CName_Txt.Text = Ft.F_CName;
            F_Remark_Txt.Text = Ft.F_Remark;

            QueryParam qp = new QueryParam();
            qp.Where = string.Format("where V_F_Key = '{0}'", Common.inSQL(Ft.F_Key));
            qp.Orderfld = " V_ShowOrder ";
            qp.OrderType = 0;
            int RecordCount = 0;
            ArrayList lst = BusinessFacade.sys_FieldValueList(qp, out RecordCount);
            Main_Value.DataSource = lst;
            Main_Value.DataBind();

            if (CMD == "List")
            {
                HeadMenuButtonItem bi1 = new HeadMenuButtonItem();
                bi1.ButtonPopedom = PopedomType.Edit;
                bi1.ButtonName = "应用字段";
                bi1.ButtonUrl = string.Format("?CMD=Edit&FieldID={0}", FieldID);
                HeadMenuWebControls1.ButtonList.Add(bi1);

                HeadMenuButtonItem bi3 = new HeadMenuButtonItem();
                bi3.ButtonPopedom = PopedomType.New;
                bi3.ButtonName = "应用字段值";
                bi3.ButtonUrl = string.Format("showPopWin('应用字段值增加','FieldValueBox.aspx?FieldID={0}&CMD=New&{1}', 300, 160, AlertMessageBox,true);", FieldID, Common.RndNum(7));
                bi3.ButtonUrlType = UrlType.JavaScript;
                HeadMenuWebControls1.ButtonList.Add(bi3);

                HeadMenuButtonItem bi4 = new HeadMenuButtonItem();
                bi4.ButtonPopedom = PopedomType.Edit;
                bi4.ButtonName = "排序应用字段值";
                bi4.ButtonIcon = "Orderby.gif";
                bi4.ButtonUrl = string.Format("showPopWin('应用字段值排序','FieldValueBox.aspx?F_Key={0}&CMD=OrderBy&{1}', 180, 210, AlertMessageBox,true);", Ft.F_Key, Common.RndNum(7));
                bi4.ButtonUrlType = UrlType.JavaScript;
                HeadMenuWebControls1.ButtonList.Add(bi4);
                Disp_Input.Visible = false;



                F_Key_Txt.Visible = true;
                F_CName_Txt.Visible = true;
                F_Remark_Txt.Visible = true;
                F_Key.Visible = false;
                F_CName.Visible = false;
                F_Remark.Visible = false;
            }
            else if (CMD == "Edit")
            {
                F_Key.Text = Ft.F_Key;
                F_CName.Text = Ft.F_CName;
                F_Remark.Text = Ft.F_Remark;

                F_Key.Visible = false;
                F_Key_Txt.Visible = true;

                HeadMenuButtonItem bi5 = new HeadMenuButtonItem();
                bi5.ButtonIcon = "back.gif";
                bi5.ButtonPopedom = PopedomType.List;
                bi5.ButtonName = "返回";
                bi5.ButtonUrl = string.Format("?CMD=List&FieldID={0}", FieldID);
                HeadMenuWebControls1.ButtonList.Add(bi5);

                HeadMenuButtonItem bi2 = new HeadMenuButtonItem();
                bi2.ButtonPopedom = PopedomType.Delete;
                bi2.ButtonName = "应用字段";
                bi2.ButtonUrlType = UrlType.JavaScript;
                bi2.ButtonUrl = string.Format("DelData('?CMD=Delete&FieldID={0}')", FieldID);
                HeadMenuWebControls1.ButtonList.Add(bi2);



                Disp_Sub.Visible = false;
            }
            else if (CMD == "New")
            {
                Disp_Sub.Visible = false;
            }
            else if (CMD == "Delete")
            {

                Ft.DB_Option_Action_ = "Delete";
                BusinessFacade.sys_FieldInsertUpdate(Ft);

                foreach (sys_FieldValueTable var in lst)
                {
                    var.DB_Option_Action_ = "Delete";
                    BusinessFacade.sys_FieldValueInsertUpdate(var);
                }
                EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", FieldID, "删除应用字段"), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));

            }



        }
Example #26
0
 /// <summary>
 /// 返回sys_OnlineTable实体类的ArrayList对象
 /// </summary>
 /// <param name="qp">查询类</param>
 /// <param name="RecordCount">返回记录总数</param>
 /// <returns>sys_OnlineTable实体类的ArrayList对象</returns>
 public override ArrayList sys_OnlineList(QueryParam qp, out int RecordCount)
 {
     PopulateDelegate mypd = new PopulateDelegate(base.Populatesys_Online);
     return this.GetObjectList(mypd, qp, out RecordCount);
 }
Example #27
0
 /// <summary>
 /// 返回sys_ModuleExtPermissionTable实体类的ArrayList对象
 /// </summary>
 /// <param name="qp">查询类</param>
 /// <param name="RecordCount">返回记录总数</param>
 /// <returns>sys_ModuleExtPermissionTable实体类的ArrayList对象</returns>
 public override ArrayList sys_ModuleExtPermissionList(QueryParam qp, out int RecordCount)
 {
     PopulateDelegate mypd = new PopulateDelegate(base.Populatesys_ModuleExtPermission);
     return this.GetObjectList(mypd, qp, out RecordCount);
 }
Example #28
0
        /// <summary>
        /// 公共查询数据函数Sql存储过程版
        /// </summary>
        /// <param name="pd">委托对象</param>
        /// <param name="pp">查询字符串</param>
        /// <param name="RecordCount">返回记录总数</param>
        /// <returns>返回记录集ArrayList</returns>
        private ArrayList GetObjectList(PopulateDelegate pd, QueryParam pp, out int RecordCount)
        {
            ArrayList lst = new ArrayList();
            RecordCount = 0;
            using (SqlConnection conn = GetSqlConnection())
            {
                SqlCommand cmd = new SqlCommand("SupesoftPage", conn);
                cmd.CommandType = CommandType.StoredProcedure;
                // 设置参数
                cmd.Parameters.Add("@TableName", SqlDbType.NVarChar, 500).Value = pp.TableName;
                cmd.Parameters.Add("@ReturnFields", SqlDbType.NVarChar, 500).Value = pp.ReturnFields;
                cmd.Parameters.Add("@Where", SqlDbType.NVarChar, 500).Value = pp.Where;
                cmd.Parameters.Add("@PageIndex", SqlDbType.Int).Value = pp.PageIndex;
                cmd.Parameters.Add("@PageSize", SqlDbType.Int).Value = pp.PageSize;
                cmd.Parameters.Add("@Orderfld", SqlDbType.NVarChar, 200).Value = pp.Orderfld;
                cmd.Parameters.Add("@OrderType", SqlDbType.Int).Value = pp.OrderType;
                // 执行
                conn.Open();
                SqlDataReader dr = cmd.ExecuteReader();
                while (dr.Read())
                {
                    lst.Add(pd(dr));
                }
                // 取记录总数 及页数
                if (dr.NextResult())
                {
                    if (dr.Read())
                    {
                        RecordCount = Convert.ToInt32(dr["RecordCount"]);
                    }
                }

                dr.Close();
                cmd.Dispose();
                conn.Close();
            }
            return lst;
        }
Example #29
0
 private void DeleteCat(int GroupID)
 {
     //删除子分类和删除当前分类
     int RecordCount = 0;
     QueryParam qp = new QueryParam();
     qp.Where = string.Format("Where G_ParentID={0} and G_Delete = 0 ", GroupID);
     ArrayList lst = BusinessFacade.sys_GroupList(qp, out RecordCount);
     foreach (sys_GroupTable var in lst)
     {
         BusinessFacade.Update_Table_Fileds("sys_Group", "G_Delete=1", string.Format("GroupID={0}", var.GroupID));
         DeleteCat(var.GroupID);
     }
 }
Example #30
0
 /// <summary>
 /// 返回PM_ProjectsTable实体类的ArrayList对象
 /// </summary>
 /// <param name="qp">查询类</param>
 /// <param name="RecordCount">返回记录总数</param>
 /// <returns>PM_ProjectsTable实体类的ArrayList对象</returns>
 public override ArrayList PM_ProjectsList(QueryParam qp, out int RecordCount)
 {
     PopulateDelegate mypd = new PopulateDelegate(base.PopulatePM_ProjectsTable);
     return this.GetObjectList(mypd, qp, out RecordCount);
 }