Пример #1
0
    private void baseload()
    {
        #region 初始化级别
        var lavel = from c in dc.CsBaseinfoset
                    where c.Fid == int.Parse(PublicMethod.ReadXmlReturnNode("SWJB", this))
                    select new
        {
            YHLevelID = c.Infoid,
            YHLevel   = c.Infoname
        };
        LevelStore.DataSource = lavel;
        LevelStore.DataBind();
        #endregion

        #region 初始化类型
        var type = from t in dc.CsBaseinfoset
                   where t.Fid == int.Parse(PublicMethod.ReadXmlReturnNode("ZY", this))
                   orderby t.Infoid ascending
                   select new
        {
            YHTypeID = t.Infoid,
            YHType   = t.Infoname
        };
        TypeStore.DataSource = type;
        TypeStore.DataBind();
        #endregion
    }
Пример #2
0
    private void SearchLoad()//查询窗口初始化 已改
    {
        //DBSCMDataContext dc = new DBSCMDataContext();
        //初始化日期
        //df_begin.SelectedDate = System.DateTime.Today.AddDays(-6);
        //df_end.SelectedDate = System.DateTime.Today;
        //初始化部门
        var dept = from d in dc.Department
                   where d.Deptnumber.Substring(0, 4) == SessionBox.GetUserSession().DeptNumber.Substring(0, 4) &&
                   d.Deptnumber.Substring(7) == "00"
                   orderby d.Deptname
                   select new
        {
            d.Deptnumber,
            d.Deptname
        };

        DeptStore.DataSource = dept;
        DeptStore.DataBind();
        //初始化级别
        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();
    }
Пример #3
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();
    }