Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     action       = DTRequest.GetQueryString("action");
     this.id      = DTRequest.GetQueryInt("id");
     this.navtype = DTRequest.GetQueryStringValue("navtype", "OA");
     ChkAdminLevel("sys_rolemanage", action); //检查权限
     if (!string.IsNullOrEmpty(action) && action == DTEnums.ActionEnum.Edit.ToString())
     {
         if (this.id == 0)
         {
             JscriptMsg("传输参数不正确!", "back");
             return;
         }
         if (!new BLL.manager_role().Exists(this.id))
         {
             JscriptMsg("角色不存在或已被删除!", "back");
             return;
         }
     }
     if (!Page.IsPostBack)
     {
         ChkAdminLevel("sys_rolemanage", DTEnums.ActionEnum.View.ToString()); //检查权限
         RoleTypeBind();                                                      //绑定角色类型
         NavBind(this.navtype);                                               //绑定导航
         if (action == DTEnums.ActionEnum.Edit.ToString())                    //修改
         {
             ShowInfo(this.id);
         }
     }
 }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.navtype = DTRequest.GetQueryStringValue("navtype", "OA");

            if (!Page.IsPostBack)
            {
                ChkAdminLevel("sys_navigation", DTEnums.ActionEnum.View.ToString()); //检查权限
                this.ddlNavType.SelectedValue = this.navtype;
                RptBind(this.navtype);
            }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = DTRequest.GetQueryString("action");

            this.id      = DTRequest.GetQueryInt("id");
            this.navtype = DTRequest.GetQueryStringValue("navtype", "System");

            if (!string.IsNullOrEmpty(_action) && _action == DTEnums.ActionEnum.Edit.ToString())
            {
                this.action = DTEnums.ActionEnum.Edit.ToString();//修改类型
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.navigation().Exists(this.id))
                {
                    JscriptMsg("导航不存在或已被删除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("sys_navigation", DTEnums.ActionEnum.View.ToString()); //检查权限
                ActionTypeBind();                                                    //绑定操作权限类型
                if (action == DTEnums.ActionEnum.Edit.ToString())                    //修改
                {
                    ShowInfo(this.id);
                }
                else
                {
                    TreeBind(navtype); //绑定导航菜单
                    this.ddlNavigationType.SelectedValue = this.navtype;
                    if (this.id > 0)
                    {
                        this.ddlParentId.SelectedValue = this.id.ToString();
                    }
                    txtName.Attributes.Add("ajaxurl", "../../tools/admin_ajax.ashx?action=navigation_validate");
                }
            }
        }
Beispiel #4
0
 protected string channel_name = string.Empty; //频道名称
 /// <summary>
 /// 重写虚方法,此方法将在Init事件前执行
 /// </summary>
 protected override void ShowPage()
 {
     page         = DTRequest.GetQueryInt("page", 1);
     keyword      = DTRequest.GetQueryStringValue("keyword");
     channel_name = DTRequest.GetQueryStringValue("channel_name");
 }
Beispiel #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Model.manager model = GetAdminInfo(); //取得当前管理员信息

            string _action = DTRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == DTEnums.ActionEnum.Edit.ToString())
            {
                ChkAdminLevel("electricity_list", DTEnums.ActionEnum.Edit.ToString()); //检查权限
                tbequipmentId.Enabled = false;
                this.action           = DTEnums.ActionEnum.Edit.ToString();            //修改类型
                if (!int.TryParse(Request.QueryString["id"] as string, out this.id))
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.dt_item().Exists(this.id))
                {
                    JscriptMsg("记录不存在或已被删除!", "back");
                    return;
                }
                else if (model.role_type != 1)
                {
                    Model.dt_item itemmodel = new BLL.dt_item().GetModel(this.id);
                    if (itemmodel.user_id != model.id)
                    {
                        JscriptMsg("记录不存在或已被删除!", "back");
                        return;
                    }
                }
            }
            else
            {
                ChkAdminLevel("electricity_list", DTEnums.ActionEnum.Add.ToString()); //检查权限
            }
            if (!Page.IsPostBack)
            {
                string zb   = "";
                string elng = DTRequest.GetQueryStringValue("elng", "");
                string elat = DTRequest.GetQueryStringValue("elat", "");
                if (!string.IsNullOrEmpty(elat) && !string.IsNullOrEmpty(elng))
                {
                    zb = elng.Replace("D", ".") + "," + elat.Replace("D", ".");
                }

                //BLL.dt_area_code bll = new BLL.dt_area_code
                ddlArea.DataTextField  = "name";
                ddlArea.DataValueField = "code";
                ddlArea.DataSource     = ManagePage.arealist;
                ddlArea.DataBind();


                BLL.manager bll = new BLL.manager();
                ddlUser.DataTextField  = "real_name";
                ddlUser.DataValueField = "id";
                ddlUser.DataSource     = bll.GetList(9999, "", " id asc");
                ddlUser.DataBind();
                ListItem li = new ListItem();
                li.Value = "";
                li.Text  = "请选择区域";
                ddlArea.Items.Insert(0, li);
                li.Value = "";
                li.Text  = "请选择用户";
                ddlUser.Items.Insert(0, li);

                if (this.action == DTEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id, zb);
                }
                else
                {
                    if (!string.IsNullOrEmpty(zb))
                    {
                        tbPosition.Text = zb;
                    }
                }
            }
        }