Beispiel #1
0
    /// <summary>
    /// 频道绑定
    /// </summary>
    /// <param name="Id"></param>
    /// <param name="Separator"></param>
    protected void ChannelBind(int Id, string Separator)
    {
        DataView dv = new DataView(c_dsList.Tables[0]);

        dv.RowFilter = "ParentId = " + Id;
        int item = 1;

        foreach (DataRowView dr in dv)
        {
            Response.Write(Separator);
            Response.Write("<img src=\"../skin/01/ico/tree_minusmiddle.gif\" width=\"18\" height=\"18\" align=\"absmiddle\" />");
            Response.Write("<input type=\"checkbox\" name=\"GroupSetting\" onclick=\"GroupChecked('" + "SetId_" + Id + "_" + item + "'," + dr[0] + ")\" id=\"SetId_" + Id + "_" + item + "\" value=\"" + dr[0].ToString() + "\"");
            if (!String.IsNullOrEmpty(GroupSetting))
            {
                string[] Ary = GroupSetting.Split(',');
                foreach (string k in Ary)
                {
                    if (k.ToString() == dr[0].ToString())
                    {
                        Response.Write(" checked");
                    }
                }
            }
            Response.Write(" />" + dr[2]);
            Response.Write("  <span id=\"checkid_" + dr[0] + "\">" + GetOther(dr[0], dr[6]) + "</span>\r\n");
            Response.Write("<br />");
            ChannelBind(StringDeal.ToInt(dr[0]), "<img src=\"../skin/01/ico/tree_treemiddle.gif\" width=\"18\" height=\"18\" align=\"absmiddle\" />" + Separator);
            item++;
        }
    }
    /// <summary>
    /// 后台频道列表
    /// </summary>
    protected void GetChannelList(int ParentId)
    {
        DataView dv = new DataView(dsList.Tables[0]);

        dv.RowFilter = "ParentId = " + ParentId;
        foreach (DataRowView dr in dv)
        {
            HttpContext.Current.Response.Write("<tr onMouseOver=\"over()\" onClick=\"change()\" onMouseOut=\"out()\" class=\"td_bg\">");
            HttpContext.Current.Response.Write("<td align=\"center\" nowrap=\"nowrap\">" + dr[0] + "</td>");
            HttpContext.Current.Response.Write("<td>");
            for (int i = 0; i < (int)dr[5]; i++)
            {
                HttpContext.Current.Response.Write("<img alt=\"\" src=\"../skin/01/ico/tree_treemiddle.gif\" width=\"18\" height=\"18\" align=\"absmiddle\">");
            }
            HttpContext.Current.Response.Write(bC.GetChannelIsSub((int)dr[0]));
            HttpContext.Current.Response.Write(StringDeal.StrFormat(dr[2]) + "</td>");
            HttpContext.Current.Response.Write("<td align=\"left\">" + StringDeal.StrFormat(dr[3]) + "</td>");
            HttpContext.Current.Response.Write("<td align=\"center\" nowrap=\"nowrap\">");
            HttpContext.Current.Response.Write("<a href=\"?Action=up&Id=" + dr[0] + "\">上移</a>");
            HttpContext.Current.Response.Write(" <a href=\"?Action=down&Id=" + dr[0] + "\">下移</a>");
            HttpContext.Current.Response.Write(" <a href=\"?Action=lock&Id=" + dr[0] + "\">" + StringDeal.GetLock(dr[4], "频道") + "</a>");
            HttpContext.Current.Response.Write(" <a href=\"Channel_Edit.aspx?Id=" + dr[0] + "\">修改</a>");
            HttpContext.Current.Response.Write(" <a onClick=\"return confirm('确认删除')\" href=\"?Action=del&Id=" + dr[0] + "\">删除</a>");
            HttpContext.Current.Response.Write("</td></tr>");
            GetChannelList(StringDeal.ToInt(dr[0]));
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdminManage();
        Pages = StringDeal.ToInt(Request.QueryString["Page"]);
        string Action = Request.QueryString["Action"];

        mA.Temp = Request.Params["Id"];
        if (Action == "del")
        {
            bA.AdminDel(mA);
            Response.Redirect("Admin_Manage.aspx?Page=" + Pages);
        }
        else if (Action == "lock")
        {
            mA.Id = StringDeal.ToInt(Request.QueryString["Id"]);
            if (bA.GetAdminLock(mA))
            {
                mA.IsLock = false;
            }
            else
            {
                mA.IsLock = true;
            }
            bA.AdminLock(mA);
            Response.Redirect("Admin_Manage.aspx?Page=" + Pages);
        }
        if (!IsPostBack)
        {
            AdminBind();
        }
    }
    /// <summary>
    /// 后台频道列表
    /// </summary>
    protected void GetUserGroupList(int ParentId)
    {
        DataView dv = new DataView(dsList.Tables[0]);

        dv.RowFilter = "ParentId = " + ParentId;
        foreach (DataRowView dr in dv)
        {
            HttpContext.Current.Response.Write("<tr onMouseOver=\"over()\" onClick=\"change()\" onMouseOut=\"out()\" class=\"td_bg\">");
            HttpContext.Current.Response.Write("<td align=\"center\" nowrap=\"nowrap\">" + dr[0] + "</td>");
            HttpContext.Current.Response.Write("<td>");
            for (int i = 0; i < (int)dr[11]; i++)
            {
                HttpContext.Current.Response.Write("<img alt=\"\" src=\"../skin/01/ico/tree_treemiddle.gif\" width=\"18\" height=\"18\" align=\"absmiddle\">");
            }
            HttpContext.Current.Response.Write(bUG.GetUserGroupIsSub((int)dr[0]));
            HttpContext.Current.Response.Write(StringDeal.StrFormat(dr[2]) + "</td>");
            HttpContext.Current.Response.Write("<td align=\"center\">" + bUG.GetModelTitle(dr[4]) + "</td>");
            HttpContext.Current.Response.Write("<td align=\"center\">" + GetUserCount(dr[0]) + "</td>");
            HttpContext.Current.Response.Write("<td align=\"center\" nowrap=\"nowrap\">");
            HttpContext.Current.Response.Write(" <a href=\"User_Manage.aspx?GroupId=" + dr[0] + "\">用户列表</a>");
            HttpContext.Current.Response.Write(" <a href=\"?Action=lock&Id=" + dr[0] + "\">" + StringDeal.GetLock(dr[10], "组") + "</a>");
            HttpContext.Current.Response.Write(" <a href=\"UserGroup_Edit.aspx?Id=" + dr[0] + "\">修改</a>");
            HttpContext.Current.Response.Write(" <a onClick=\"return confirm('确认删除')\" href=\"?Action=del&Id=" + dr[0] + "\">删除</a>");
            HttpContext.Current.Response.Write("</td></tr>");
            GetUserGroupList(StringDeal.ToInt(dr[0]));
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdminManage();
        if (!IsPostBack)
        {
            bTable bT     = new bTable();
            string Action = Request.QueryString["Action"];
            if (Action == "del")
            {
                mTable mT = new mTable();
                mT.Id = StringDeal.ToInt(Request.QueryString["Id"]);
                if (bT.GetIsSystem(mT))
                {
                    StringDeal.Alter("此模型为系统模型禁止删除!");
                }
                mT.TableName = bT.GetTableName(mT.Id);
                bT.TableDel(mT);
                HXD.ModelField.BLL.Table bt = new HXD.ModelField.BLL.Table();
                bt.DeleteXml(mT);
            }

            DBList.DataSource = bT.TableList();
            DBList.DataBind();
        }
    }
Beispiel #6
0
    protected void getztOperation()
    {
        int icd = StringDeal.ToInt(Request.QueryString["Id"]);

        if (icd > 0)
        {
            string Action = Request.QueryString["Action"];
            if (Action == "del")
            {
                //string sql = "delete from tb_User where ID='" + icd + "';delete from tb_U_User where ID='" + icd + "'";delete from tb_U_Message where uid='" + icd + "';delete from t_exam_subitems_score where Fresultid='" + icd + "';
                string sql = "delete from tb_User where ID='" + icd + "';delete from tb_U_User where ID='" + icd + "';delete from tb_U_Message where uid='" + icd + "';delete from t_exam_subitems_score where Fresultid='" + icd + "'";
                HXD.DBUtility.SQLHelper.ExecuteScalar(sql);
            }
            //else if (Action == "lock")
            //{
            //    string sql2 = "SELECT IsLock from tb_User where id='" + icd + "'";
            //    bool stra = bool.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString());
            //    if (stra == true)
            //    {
            //        string sql = "UPDATE tb_User set IsLock=0 where id='" + icd + "'";
            //        HXD.DBUtility.SQLHelper.ExecuteScalar(sql);
            //    }
            //    else
            //    {
            //        string sql = "UPDATE tb_User set IsLock=1 where id='" + icd + "'";
            //        HXD.DBUtility.SQLHelper.ExecuteScalar(sql);
            //    }
            //}


            Response.Redirect("Font_list2.aspx", true);
        }
    }
 /// <summary>
 /// 保存频道修改/添加
 /// </summary>
 protected void ChannelSave(object sender, EventArgs e)
 {
     mC.Title    = this.Title.Text;
     mC.Url      = this.Url.Text;
     mC.Target   = this.Target.Text;
     mC.Note     = this.Note.Text;
     mC.ParentId = StringDeal.ToInt(this.ParentId.Text);
     for (int s = 0; s < this.Setting.Items.Count; s++)
     {
         if (this.Setting.Items[s].Selected)
         {
             mC.Setting += this.Setting.Items[s].Value + ",";
         }
     }
     if (!String.IsNullOrEmpty(mC.Setting))
     {
         mC.Setting = mC.Setting.Trim(',');
     }
     else
     {
         mC.Setting = "";
     }
     if (mC.Id > 0)
     {
         if (bC.ChannelUpdate(mC) == 1)
         {
             StringDeal.Alter("父级菜单不能是其本身!");
         }
     }
     else
     {
         bC.ChannelInsert(mC);
     }
     StringDeal.Alter("保存完成!", "Channel_Manage.aspx");
 }
Beispiel #8
0
    protected void getztOperation()
    {
        if (Request.QueryString["cid"] != null)
        {
            string clssid = Request.QueryString["cid"].ToString();
            int    icd    = StringDeal.ToInt(Request.QueryString["Id"]);
            if (icd > 0)
            {
                string Action = Request.QueryString["Action"];
                if (Action == "del")
                {
                    string sqll = "select COUNT(id) from tb_U_schoolfl where ClassId=" + icd;
                    int    ma   = int.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sqll).ToString());
                    if (ma == 0)
                    {
                        string sql = "delete from tb_U_schoolfl where ID='" + icd + "';";
                        HXD.DBUtility.SQLHelper.ExecuteScalar(sql);
                    }
                    else
                    {
                        StringDeal.Alter("请先删除下级!");
                    }
                }



                Response.Redirect("sc_fl.aspx?cid=" + clssid, true);
            }
        }
    }
Beispiel #9
0
    protected void getztOperation()
    {
        int icd = StringDeal.ToInt(Request.QueryString["Id"]);

        if (icd > 0)
        {
            string Action = Request.QueryString["Action"];
            if (Action == "del")
            {
                string sql = "delete from tb_U_Message where ID='" + icd + "';";
                HXD.DBUtility.SQLHelper.ExecuteScalar(sql);
            }
            else if (Action == "lock")
            {
                string sql2 = "SELECT IsStatus from tb_U_Message where id='" + icd + "'";
                bool   stra = bool.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString());
                if (stra == true)
                {
                    string sql = "UPDATE tb_U_Message set IsStatus=0 where id='" + icd + "'";
                    HXD.DBUtility.SQLHelper.ExecuteScalar(sql);
                }
                else
                {
                    string sql = "UPDATE tb_U_Message set IsStatus=1 where id='" + icd + "'";
                    HXD.DBUtility.SQLHelper.ExecuteScalar(sql);
                }
            }


            Response.Redirect("message.aspx", true);
        }
    }
    /// <summary>
    /// 删除和移动顺序操作
    /// </summary>
    protected void Operation()
    {
        string Action = Request.QueryString["Action"];

        mF.Id = StringDeal.ToInt(Request.QueryString["Id"]);
        if (!String.IsNullOrEmpty(Action))
        {
            if (Action == "down" || Action == "up")
            {
                bF.FieldMove(mF, Action);
            }
            else if (Action == "del")
            {
                mF = bF.GetTableAndField(mF);//字段名与表名
                bF.FieldDel(mF);
                HXD.ModelField.BLL.Field   bf = new HXD.ModelField.BLL.Field();
                HXD.ModelField.Model.Field mf = new HXD.ModelField.Model.Field();
                mf.TableName = mF.TableName;
                mf.Name      = mF.Field;
                bf.Val       = mf;
                bf.DeleteXml();
            }
            Response.Redirect("Field_Manage.aspx?TableId=" + TableId + "", true);
        }
    }
Beispiel #11
0
 /// <summary>
 /// 对栏目的操作(删除,锁定,置顶,排序)
 /// </summary>
 protected void Operation()
 {
     mM.Id = StringDeal.ToInt(Request.QueryString["Id"]);
     if (mM.Id > 0)
     {
         string Action = Request.QueryString["Action"];
         if (Action == "del")
         {
             string Result = bM.MenuDel(mM).ToString();
             if (Result == "1")
             {
                 StringDeal.Alter("此栏目下存在子栏目,请先删除子栏目!");
             }
         }
         else if (Action == "lock")
         {
             bM.MenuLock(mM);
         }
         else if (Action == "top")
         {
             bM.MenuTop(mM);
         }
         else if (Action == "down" || Action == "up")
         {
             bM.MenuMove(mM, Action);
         }
         Response.Redirect("Menu_Manage.aspx?MenuId=" + MenuId + "", true);
     }
 }
Beispiel #12
0
    protected void getztOperation()
    {
        string clssid = Request.QueryString["cid"].ToString();
        int    icd    = StringDeal.ToInt(Request.QueryString["Id"]);

        if (icd > 0)
        {
            string Action = Request.QueryString["Action"];
            if (Action == "del")
            {
                string sql = "delete from tb_U_schoolfl where ID='" + icd + "';";
                HXD.DBUtility.SQLHelper.ExecuteScalar(sql);
            }
            else if (Action == "lock")
            {
                string sql2 = "SELECT IsLock from tb_User where id='" + icd + "'";
                bool   stra = bool.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString());
                if (stra == true)
                {
                    string sql = "UPDATE tb_User set IsLock=0 where id='" + icd + "'";
                    HXD.DBUtility.SQLHelper.ExecuteScalar(sql);
                }
                else
                {
                    string sql = "UPDATE tb_User set IsLock=1 where id='" + icd + "'";
                    HXD.DBUtility.SQLHelper.ExecuteScalar(sql);
                }
            }


            Response.Redirect("sl_fl.aspx?cid=" + clssid, true);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdminManage();
        AdminSetting.isPermissions("2", "5");
        string Action = Request.QueryString["Action"];
        int    Id     = StringDeal.ToInt(Request.QueryString["Id"]);

        if (Action == "del")
        {
            AdminSetting.isPermissions("2", "3");
            string Result = bC.ChannelDel(Id).ToString();
            if (Result == "1")
            {
                StringDeal.Alter("此频道下存在子频道,请先删除子频道!");
            }
        }
        else if (Action == "lock")
        {
            bC.ChannelLock(Id);
        }
        else if (Action == "down" || Action == "up")
        {
            bC.ChannelMove(Id, Action);
        }
        dsList = (DataSet)bC.ChannelList(-1);
    }
 /// <summary>
 /// 保存频道修改/添加
 /// </summary>
 protected void UserGroupSave()
 {
     mUG.Title         = this.Title.Text;
     mUG.ParentId      = StringDeal.ToInt(this.ParentId.Text);
     mUG.Note          = this.Note.Text;
     mUG.Model         = StringDeal.ToInt(this.Model.Text);
     mUG.RegIntegral   = StringDeal.ToInt(this.RegIntegral.Text);
     mUG.LoginIntegral = StringDeal.ToInt(this.LoginIntegral.Text);
     mUG.Collection    = StringDeal.ToInt(this.Collection.Text);
     mUG.Invite        = StringDeal.ToInt(this.Invite.Text);
     mUG.RegState      = StringDeal.ToBool(this.RegState.Text);
     mUG.GroupSetting  = StringDeal.StrFormat(Request.Form["GroupSetting"]);
     if (mUG.Id > 0)
     {
         if (bUG.UserGroupUpdate(mUG) == 1)
         {
             StringDeal.Alter("父级用户组不能为其本身!");
         }
     }
     else
     {
         bUG.UserGroupInsert(mUG);
     }
     StringDeal.Alter("保存完成!", "UserGroup_Manage.aspx");
 }
Beispiel #15
0
 /// <summary>
 /// 添加用户
 /// </summary>
 /// <param name="Info"></param>
 public int UserInsert(mUser Info)
 {
     SqlParameter[] par = new SqlParameter[] {
         new SqlParameter("@GroupId", Info.GroupId),
         new SqlParameter("@UserName", Info.UserName),
         new SqlParameter("@UserPwd", Info.UserPwd)
     };
     return(StringDeal.ToInt(SQLHelper.ExecuteScalar("UserInsert", par)));
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        string Model = Request.QueryString["Model"];
        int    Id    = StringDeal.ToInt(Request.QueryString["Id"]);
        int    Sort  = StringDeal.ToInt(Request.QueryString["Sort"]);

        HXD.ModelField.BLL.Model mm = new HXD.ModelField.BLL.Model();
        mm.ModelSort(Id, Model, Sort);
    }
Beispiel #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage();
        getztOperation();
        if (!IsPostBack)
        {
            string MenuId    = Session["userid"].ToString();
            string sql_mid   = "select Classid from tb_User where id=" + MenuId;
            int    scholl_id = int.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql_mid).ToString());

            //string sql = "SELECT * from tb_User where Classid='" + scholl_id + "' and GroupId=1 order by id";

            //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
            //Repeater1.DataBind();
            //cid 1=测评  2=预约  3=辅导 4=消息
            HXD.ModelField.BLL.Model   bll = new HXD.ModelField.BLL.Model();
            HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model();
            mod.Condition = " Classid=" + scholl_id + " and cid=4 and zxs_id=" + MenuId + "";
            mod.FieldList = "Content,ClassId,PostTime,IsStatus";
            mod.TableName = "tb_U_Message";
            mod.Sort      = "Sort desc";
            mod.PageSize  = 20;
            mod.PageIndex = HXD.Common.StringDeal.ToInt(Request.QueryString["page"]);
            DataSet ds1 = bll.ModelList(mod);
            DataSet ds  = HXD.DBUtility.SQLHelper.ExecuteDataset("select top 20 Content,ClassId,PostTime,IsStatus from tb_U_Message where Classid=" + scholl_id + "  order by Sort desc,id desc;");
            this.Repeater1.DataSource = ds1;
            this.Repeater1.DataBind();

            HXD.Common.SgqPage pg = new HXD.Common.SgqPage();
            pg.PageSize        = mod.PageSize;
            pg.PageIndex       = mod.PageIndex;
            pg.RecordCount     = (int)ds1.Tables[1].Rows[0][0];
            this.Literal1.Text = pg.PageView2();
            if (pg.RecordCount == 0)
            {
                this.Literal1.Text = "暂无数据!";
            }
            ds.Clear();
            ds.Dispose();
            ds1.Clear();
            ds1.Dispose();

            //审核
            int    icd    = StringDeal.ToInt(Request.QueryString["Id"]);
            string Action = Request.QueryString["Action"];
            if (Action == "lock")
            {
                string sql2 = "SELECT IsStatus from tb_U_Message where id='" + icd + "'";
                bool   stra = bool.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString());

                string sql = "UPDATE tb_U_Message set IsStatus=1 where id='" + icd + "'";
                HXD.DBUtility.SQLHelper.ExecuteScalar(sql);
            }
        }
    }
Beispiel #18
0
 /// <summary>
 /// 查看管理员用户名是否存在
 /// </summary>
 /// <param name="Info"></param>
 /// <returns></returns>
 public bool IsAdminUserName(mAdmin Info)
 {
     if (StringDeal.ToInt(SQLHelper.ExecuteScalar("IsAdminUserName", Info.UserName)) > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #19
0
 /// <summary>
 /// 用户修改密码
 /// </summary>
 /// <param name="Info"></param>
 /// <returns></returns>
 public bool UserPwdEdit(mUser Info)
 {
     if (StringDeal.ToInt(SQLHelper.ExecuteScalar("UserPwdEdit", Info.UserName, Info.UserPwd)) > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #20
0
 /// <summary>
 /// 判断旧密码是否输入正确
 /// </summary>
 /// <param name="Info"></param>
 /// <returns></returns>
 public bool IsOldPwd(mUser Info)
 {
     if (StringDeal.ToInt(SQLHelper.ExecuteScalar("IsUserOldPwd", Info.UserName, Info.UserPwd)) > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #21
0
 /// <summary>
 /// 获取当前频道前的ICO图片
 /// </summary>
 /// <param name="Id"></param>
 /// <returns></returns>
 protected string GetChannelIco(object Id)
 {
     if (b.GetChannelSubCount(StringDeal.ToInt(Id)) > 0)
     {
         return("fold");
     }
     else
     {
         return("open");
     }
 }
Beispiel #22
0
        private void MenuList(int Id, string Separator, string MenuId)
        {
            DataView dv = new DataView(dsList.Tables[0]);

            dv.RowFilter = "ParentId = " + Id;
            foreach (DataRowView dr in dv)
            {
                HttpContext.Current.Response.Write("    <option value='" + dr["Id"] + "'" + StringDeal.GetSelected(dr["Id"], MenuId) + ">" + Separator + StringDeal.StrFormat(dr["Title"]) + "</option>");
                MenuList(StringDeal.ToInt(dr[0]), "┃" + Separator, MenuId);
            }
        }
 /// <summary>
 /// 获取此栏目所需要的字段数组
 /// </summary>
 /// <param name="Id"></param>
 private void GetModelField(int Id)
 {
     mM.Temp = "Model_Field";
     Arry    = bM.GetMenuField(mM, Id).Split('|');
     if (Arry.Length < 1 || String.IsNullOrEmpty(Arry[0]))
     {
         mM.Temp = "ParentId";
         int ParentId = StringDeal.ToInt(bM.GetMenuField(mM, Id));
         GetModelField(ParentId);
     }
 }
Beispiel #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdminManage(null);
        int Id = StringDeal.ToInt(Request.QueryString["Id"]);

        if (Id == 0)
        {
            Id = b.GetChannelFirstParentId(Session["AdminManage"].ToString());
        }
        Titles            = b.GetChannelTitle(Id);
        DBList.DataSource = b.GetChannelMenu(Id, Session["AdminManage"].ToString())[0].Tables[0];
        DBList.DataBind();
    }
Beispiel #25
0
 /// <summary>
 /// 修改管理员组
 /// </summary>
 /// <param name="Info"></param>
 public int AdminGroupUpdate(mAdminGroup Info)
 {
     SqlParameter[] par = new SqlParameter[]
     {
         new SqlParameter("@Id", Info.Id),
         new SqlParameter("@Title", Info.Title),
         new SqlParameter("@ParentId", Info.ParentId),
         new SqlParameter("@Note", Info.Note),
         new SqlParameter("@GroupSetting", Info.GroupSetting),
         new SqlParameter("@OtherSetting", Info.OtherSetting)
     };
     return(StringDeal.ToInt(SQLHelper.ExecuteScalar("AdminGroupEdit", par)));
 }
Beispiel #26
0
 /// <summary>
 /// 根据ID获取单条模型信息
 /// </summary>
 /// <param name="Info"></param>
 /// <returns></returns>
 public mTable TableRead(mTable Info)
 {
     using (SqlDataReader dr = SQLHelper.ExecuteReader("TableRead", Info.Id))
     {
         if (dr.Read())
         {
             Info.Title     = dr[0].ToString();
             Info.TableName = dr[1].ToString();
             Info.Note      = dr[2].ToString();
             Info.Type      = StringDeal.ToInt(dr[3]);
         }
     }
     return(Info);
 }
    /// <summary>
    /// 用户组绑定
    /// </summary>
    /// <param name="Id"></param>
    /// <param name="Separator"></param>
    protected void UserGroupBind(int Id, string Separator)
    {
        DataView dv = new DataView(ug_dsList.Tables[0]);

        dv.RowFilter = "ParentId = " + Id;
        foreach (DataRowView dr in dv)
        {
            ListItem li = new ListItem();
            li.Text  = Separator + StringDeal.StrFormat(dr[2]);
            li.Value = dr[0].ToString();
            this.ParentId.Items.Add(li);
            UserGroupBind(StringDeal.ToInt(dr[0]), "┃" + Separator);
        }
    }
Beispiel #28
0
 /// <summary>
 /// 修改后台频道
 /// </summary>
 /// <param name="Info"></param>
 public int ChannelUpdate(mChannel Info)
 {
     SqlParameter[] par = new SqlParameter[] {
         new SqlParameter("@Id", Info.Id),
         new SqlParameter("@Title", Info.Title),
         new SqlParameter("@Note", Info.Note),
         new SqlParameter("@Target", Info.Target),
         new SqlParameter("@Url", Info.Url),
         new SqlParameter("@ParentId", Info.ParentId),
         new SqlParameter("@Setting", Info.Setting),
         new SqlParameter("@IsLock", Info.IsLock)
     };
     return(StringDeal.ToInt(SQLHelper.ExecuteScalar("ChannelEdit", par)));
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdminManage();
        TableId = StringDeal.ToInt(Request.QueryString["TableId"]);
        bTable bT = new bTable();

        mF.TableName = bT.GetTableName(TableId);

        if (!IsPostBack)
        {
            Operation();
            DBList.DataSource = bF.FieldList(mF);
            DBList.DataBind();
        }
    }
Beispiel #30
0
    protected void getztOperation()
    {
        int icd = StringDeal.ToInt(Request.QueryString["cid"]);

        if (icd > 0)
        {
            string Action = Request.QueryString["Action"];
            if (Action == "end")
            {
                string sql = "update tb_U_Message set state=2 where ID='" + icd + "'";
                HXD.DBUtility.SQLHelper.ExecuteScalar(sql);
            }
            Response.Redirect("fd_gt.aspx", true);
        }
    }