Exemplo n.º 1
0
        protected void btnDel_Click(object sender, EventArgs e)
        {
            int result = 0;

            if (Utils.ToInt(nodeValue) > 0)
            {
                HoneyWell.Model.Sys_Menu info = new HoneyWell.BLL.Sys_Menu().GetModel(Convert.ToInt32(nodeValue));
                HoneyWell.Model.Sys_Logs logs = new HoneyWell.Model.Sys_Logs();
                logs.ID         = 0;
                logs.DutyId     = Utils.ToInt(GetDutyId());
                logs.LoginName  = GetUserName();
                logs.TitleName  = "模块管理";
                logs.Depicts    = "删除模块信息,名称为:" + info.MenuNameC + "";
                logs.CreateTime = DateTime.Now;
                logs.IpAddress  = Request.UserHostAddress;
                logs.MoreCol1   = "";
                logs.MoreCol2   = "";
                new HoneyWell.BLL.Sys_Logs().Add(logs);
                result = new HoneyWell.BLL.Sys_Public().Delete("Sys_Menu", " ID=" + Utils.ToInt(nodeValue) + "");
            }


            if (result > 0)
            {
                ScriptManager.RegisterClientScriptBlock(btnSave, GetType(), "", "alert('操作成功!');parent.location='sys_Module_Tree.aspx'", true);
            }
        }
Exemplo n.º 2
0
        protected void btnDel_Click(object sender, EventArgs e)
        {
            int       result    = 0;
            string    tableName = "Sys_Area";
            string    showField = " top 1 ID";
            string    strWhere  = " and AreaCode='" + nodeValue + "'";
            DataTable dt        = new BLL.Sys_Public().SelectData(showField, tableName, strWhere).Tables[0];

            if (dt != null && dt.Rows.Count > 0)
            {
                nodeId = Utils.ToInt(dt.Rows[0]["ID"].ToString());
            }
            if (nodeId > 0)
            {
                HoneyWell.Model.Sys_Area info = new HoneyWell.BLL.Sys_Area().GetModel(nodeId);

                HoneyWell.Model.Sys_Logs logs = new HoneyWell.Model.Sys_Logs();
                logs.ID         = 0;
                logs.DutyId     = Utils.ToInt(GetDutyId());
                logs.LoginName  = GetUserName();
                logs.TitleName  = "区域管理";
                logs.Depicts    = "删除区域信息,名称为:" + info.AreaName + "";
                logs.CreateTime = DateTime.Now;
                logs.IpAddress  = Request.UserHostAddress;
                logs.MoreCol1   = "";
                logs.MoreCol2   = "";
                new HoneyWell.BLL.Sys_Logs().Add(logs);

                result = new HoneyWell.BLL.Sys_Public().Delete("Sys_Area", " ID=" + nodeId + "");
            }


            if (result > 0)
            {
                ScriptManager.RegisterClientScriptBlock(btnSave, GetType(), "", "alert('操作成功!');parent.location='sys_Area_Tree.aspx'", true);
            }
        }
Exemplo n.º 3
0
        protected void rptLoop_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                if (e.CommandName == "del")
                {
                    HoneyWell.Model.Sys_Admin info = new HoneyWell.BLL.Sys_Admin().GetModel(Convert.ToInt32(e.CommandArgument));

                    HoneyWell.Model.Sys_Logs logs = new HoneyWell.Model.Sys_Logs();
                    logs.ID         = 0;
                    logs.DutyId     = Utils.ToInt(GetDutyId());
                    logs.LoginName  = GetUserName();
                    logs.TitleName  = "用户信息";
                    logs.Depicts    = "删除用户信息,名称为:" + info.AUserName + "";
                    logs.CreateTime = DateTime.Now;
                    logs.IpAddress  = Request.UserHostAddress;
                    logs.MoreCol1   = "";
                    logs.MoreCol1   = "";
                    new HoneyWell.BLL.Sys_Logs().Add(logs);
                    new HoneyWell.BLL.Sys_Public().Delete("Sys_Admin", " ID=" + Convert.ToInt32(e.CommandArgument) + "");
                    ScriptManager.RegisterClientScriptBlock(rptLoop, GetType(), "", "alert('操作成功!');location.href='" + Request.Url + "';", true);
                }
            }
        }