Ejemplo n.º 1
0
 protected void KQRefresh(object sender, StoreRefreshDataEventArgs e)
 {
     if (cbbMianDept.SelectedIndex > -1)
     {
         KQStore.DataSource = PublicCode.GetKQdept(cbbMianDept.SelectedItem.Value);
         KQStore.DataBind();
         cbbKQ.Disabled = false;
     }
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Ext.IsAjaxRequest)
     {
         StoreLoad();
         DeptStore.DataSource = PublicCode.GetKQdept(SessionBox.GetUserSession().DeptNumber);
         DeptStore.DataBind();
         //获取三违预警设置
         //hdnScore.SetValue(PublicCode.GetSWMaxScoreSet(SessionBox.GetUserSession().DeptNumber));
         hdnScore.Value = PublicCode.GetSWMaxScoreSet(SessionBox.GetUserSession().DeptNumber).ToString();
         hdnCount.Value = PublicCode.GetSWMaxCountSet(SessionBox.GetUserSession().DeptNumber).ToString();
     }
 }
Ejemplo n.º 3
0
    private void BaseSet()
    {
        var dept = PublicCode.GetKQdept(SessionBox.GetUserSession().DeptNumber);

        DeptStore.DataSource = dept;
        DeptStore.DataBind();

        var place = from pl in dc.Place
                    where pl.Maindeptid == SessionBox.GetUserSession().DeptNumber
                    orderby pl.Placename ascending
                    select new
        {
            placID   = pl.Placeid,
            placName = pl.Placename
        };

        placeStore.DataSource = place;
        placeStore.DataBind();
    }
Ejemplo n.º 4
0
    private void SearchLoad()//查询窗口初始化
    {
        //初始化日期
        df_begin.SelectedDate = System.DateTime.Today.AddDays(-15);
        df_end.SelectedDate   = System.DateTime.Today;
        #region 初始化部门
        DeptStore.DataSource = PublicCode.GetKQdept(SessionBox.GetUserSession().DeptNumber);
        DeptStore.DataBind();
        #endregion

        #region 初始化单位
        if (SessionBox.GetUserSession().rolelevel.Trim().IndexOf("1") > -1)
        {
            UnitStore.DataSource = PublicCode.GetMaindept("");
            UnitStore.DataBind();
            cbbUnit.Disabled = false;

            cbb_part.Disabled = true;
        }
        else
        {
            UnitStore.DataSource = PublicCode.GetMaindept(SessionBox.GetUserSession().DeptNumber);
            UnitStore.DataBind();
            cbbUnit.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber;
            cbbUnit.Disabled           = true;
        }
        #endregion
        //三违级别
        var lavel = from c in dc.CsBaseinfoset
                    where c.Fid == int.Parse(PublicMethod.ReadXmlReturnNode("SWJB", this))
                    select new
        {
            SWLevelID = c.Infoid,
            SWLevel   = c.Infoname
        };
        LevelStore.DataSource = lavel;
        LevelStore.DataBind();
    }
Ejemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Ext.IsAjaxRequest)
        {
            #region 初始化单位
            MainDeptStore.DataSource = PublicCode.GetMaindept("");
            MainDeptStore.DataBind();

            if (SessionBox.GetUserSession().rolelevel.Contains("1") || SessionBox.GetUserSession().rolelevel.Contains("0"))
            {
                cbbKQ.Disabled     = true;
                cbbPerson.Disabled = true;
            }
            else
            {
                cbbMianDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber;
                cbbMianDept.Disabled           = true;
                KQStore.DataSource             = PublicCode.GetKQdept(SessionBox.GetUserSession().DeptNumber);
                KQStore.DataBind();
                cbbPerson.Disabled = true;
            }
            #endregion
        }
    }
Ejemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Ext.IsAjaxRequest)
        {
            UserHandle.InitModule(this.PageTag);                   //初始化此模块的权限。
            if (UserHandle.ValidationHandle(PermissionTag.Browse)) //是否有浏览权限
            {
                dfBegin.SelectedDate = System.DateTime.Today.AddDays(1 - System.DateTime.Today.Day);
                dfEnd.SelectedDate   = System.DateTime.Today;
                //dfBegin.MaxDate = System.DateTime.Today;
                //dfEnd.MaxDate = System.DateTime.Today;

                #region 初始化单位
                MainDeptStore.DataSource = PublicCode.GetMaindept("");
                MainDeptStore.DataBind();
                KQStore.DataSource = PublicCode.GetKQdept(SessionBox.GetUserSession().DeptNumber);
                KQStore.DataBind();
                if (SessionBox.GetUserSession().rolelevel.Contains("1") || SessionBox.GetUserSession().rolelevel.Contains("0"))
                {
                    cbbKQ.Disabled = true;
                }
                else
                {
                    cbbMianDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber;
                    cbbMianDept.Disabled           = true;
                }

                #endregion
                //LoadData();
                if (UserHandle.ValidationHandle(PermissionTag.SearchAll))
                {
                    cbbMianDept.Disabled = false;
                    cbbKQ.Disabled       = false;
                    btnSearch.Disabled   = false;
                }
                else if (UserHandle.ValidationHandle(PermissionTag.SearchMainDept))
                {
                    cbbMianDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber;
                    cbbMianDept.Disabled           = true;
                    cbbKQ.Disabled     = false;
                    btnSearch.Disabled = false;
                }
                else if (UserHandle.ValidationHandle(PermissionTag.SearchDept))
                {
                    cbbMianDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber;
                    cbbMianDept.Disabled           = true;
                    cbbKQ.SelectedItem.Value       = PublicCode.GetKQdeptNumber(SessionBox.GetUserSession().PersonNumber);
                    cbbKQ.Disabled     = true;
                    btnSearch.Disabled = false;
                }
                else if (UserHandle.ValidationHandle(PermissionTag.SearchPersonal))
                {
                    cbbMianDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber;
                    cbbMianDept.Disabled           = true;
                    cbbKQ.SelectedItem.Value       = PublicCode.GetKQdeptNumber(SessionBox.GetUserSession().PersonNumber);
                    cbbKQ.Disabled     = true;
                    btnSearch.Disabled = false;
                }
                else
                {
                    btnSearch.Disabled = true;
                }
            }
            else
            {
                Session["ErrorNum"] = "0";
                Response.Redirect("~/Error.aspx");
            }
        }
    }