Esempio n. 1
0
    private void Gridload()
    {
        //绑定隐患录入信息
        var data = from yh in dc.Getyhinput
                   from ny in dc.Nyhinput
                   from m in dc.NyhinputMore
                   where yh.Yhputinid == ny.Yhputinid && yh.Unitid == SessionBox.GetUserSession().DeptNumber
                   //多人排查 如果为排查人也可看到
                   && yh.Yhputinid == m.Yhputinid &&
                   (ny.Inputpersonid == SessionBox.GetUserSession().PersonNumber || m.Personid == SessionBox.GetUserSession().PersonNumber) &&
                   yh.Intime >= System.DateTime.Today.AddDays(-7)   //查询最近7天的信息
                   orderby yh.Intime descending
                   select new
        {
            YHPutinID = yh.Yhputinid,
            DeptName  = yh.Deptname,
            PlaceName = yh.Placename,
            YHContent = yh.Yhcontent,
            Remarks   = yh.Remarks,
            BanCi     = yh.Banci,
            Name      = yh.Name,
            INTime    = yh.Intime,
            PCTime    = yh.Pctime,
            YHType    = yh.Typename,
            Status    = yh.Status
        };

        if (data.Count() > 0)
        {
            YHputinStore.DataSource = data;
            YHputinStore.DataBind();
        }
    }
Esempio n. 2
0
    private void Gridload()
    {
        //绑定隐患录入信息
        var data = from yh in dc.Yhinput
                   from ha in dc.Hazards
                   from hao in dc.HazardsOre
                   from p in dc.Process
                   from w in dc.Worktasks
                   from cs in dc.CsBaseinfoset
                   from d in dc.Department
                   from pl in dc.Place
                   where yh.Yhnumber == ha.HNumber && yh.Deptid == d.Deptnumber && yh.Placeid == pl.Placeid && ha.HNumber == hao.HNumber &&
                   ha.Processid == p.Processid && p.Worktaskid == w.Worktaskid && w.Professionalid == cs.Infoid && hao.HBjw == "引用" &&
                   yh.Inputpersonid == SessionBox.GetUserSession().PersonNumber &&
                   yh.Intime >= System.DateTime.Today.AddDays(-7)  //查询最近7天的信息
                   orderby yh.Intime descending
                   select new
        {
            YHPutinID = yh.Yhputinid,
            DeptName  = d.Deptname,
            PlaceName = pl.Placename,
            YHContent = hao.HBm,
            Remarks   = yh.Remarks,
            BanCi     = yh.Banci,
            //Name = per.Name,
            PCTime = yh.Pctime,
            YHType = cs.Infoname,
            Status = yh.Status
        };

        YHputinStore.DataSource = data;
        YHputinStore.DataBind();
    }