Esempio n. 1
0
    public void Gridload()
    {
        //绑定工伤信息
        var data = from gs in dc.Workinjury
                   from per in dc.Person
                   from dept in dc.Department
                   // from pos in dc.Post
                   from pl in dc.Place
                   from gslevel in dc.CsBaseinfoset
                   from inper in dc.Person
                   where gs.Personnumber == per.Personnumber && gs.Placeid == pl.Placeid && gs.GsLevelid == gslevel.Infoid && per.Areadeptid == dept.Deptnumber && inper.Personnumber == gs.Inpersonnumber && per.Maindeptid == SessionBox.GetUserSession().DeptNumber
                   select new
        {
            gs.Id,
            per.Name,
            dept.Deptname,
            //   pos.Postname,
            pl.Placename,
            gslevel.Infoname,
            gs.Happendate,
            gs.GsFact,
            gs.PointsPer,
            gs.FinePer,
            gs.PointsDept,
            gs.FineDept,
            inPersonName = inper.Name,
            gs.Indate,
            per.Personnumber,
            gs.Placeid,
            gs.GsLevelid
        };

        if (!df_begin.IsNull && !df_end.IsNull)
        {
            data = data.Where(p => p.Happendate >= df_begin.SelectedDate && p.Happendate <= df_end.SelectedDate);
        }
        if (cbbGsperson.SelectedIndex > -1)
        {
            data = data.Where(p => p.Personnumber == cbbGsperson.SelectedItem.Value);
        }
        if (cbbplace.SelectedIndex > -1)
        {
            data = data.Where(p => p.Placeid == int.Parse(cbbplace.SelectedItem.Value));
        }
        if (gsdj.SelectedIndex > -1)
        {
            data = data.Where(p => p.GsLevelid == int.Parse(gsdj.SelectedItem.Value));
        }
        if (gsss.Text != "")
        {
            data = data.Where(p => p.GsFact.Contains(gsss.Text));
        }

        GSStore.DataSource = data;
        GSStore.DataBind();
    }
Esempio n. 2
0
    private void Gridload()
    {
        //绑定工伤信息
        var data = from gs in dc.Workinjury
                   from per in dc.Person
                   from dept in dc.Department
                   // from pos in dc.Post
                   from pl in dc.Place
                   from gslevel in dc.CsBaseinfoset
                   from sglx in dc.CsBaseinfoset
                   from inper in dc.Person
                   where gs.Personnumber == per.Personnumber && gs.Placeid == pl.Placeid && gs.GsLevelid == gslevel.Infoid && gs.AccidentTypeid == sglx.Infoid && per.Areadeptid == dept.Deptnumber && inper.Personnumber == gs.Inpersonnumber && gs.Inpersonnumber == SessionBox.GetUserSession().PersonNumber
                   select new
        {
            gs.Id,
            per.Name,
            dept.Deptname,
            //   pos.Postname,
            pl.Placename,
            gslevel.Infoname,
            gs.Happendate,
            gs.GsFact,
            gs.PointsPer,
            gs.FinePer,
            gs.PointsDept,
            gs.FineDept,
            inPersonName = inper.Name,
            gs.Indate,
            sgleixing = sglx.Infoname,
            gs.Banci,
            gs.Injurysite,
            gs.Reason,
            gs.PointsBz,
        };

        GSStore.DataSource = data.OrderByDescending(p => p.Indate);
        GSStore.DataBind();
    }