コード例 #1
0
ファイル: YHBaseSet.aspx.cs プロジェクト: chcyellow/SEPkuang
    private void baseload()
    {
        #region 初始化级别
        var lavel = from c in dc.CsBaseinfoset
                    where c.Fid == int.Parse(PublicMethod.ReadXmlReturnNode("YHJB", 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

        #region 初始化事故类型
        var sg = from t in dc.CsBaseinfoset
                 where t.Fid == int.Parse(PublicMethod.ReadXmlReturnNode("SGLX", this))
                 orderby t.Infoid ascending
                 select new
        {
            t.Infoid,
            t.Infoname
        };
        SGStore.DataSource = sg;
        SGStore.DataBind();
        #endregion
    }
コード例 #2
0
    private void Gridload()
    {
        //绑定工伤信息
        var data = from sg in dc.Accidentcase
                   from sf in dc.CsBaseinfoset
                   from jt in dc.CsBaseinfoset
                   from sglx in dc.CsBaseinfoset
                   from sgdj in dc.CsBaseinfoset
                   from wsdj in dc.CsBaseinfoset
                   from kjlx in dc.CsBaseinfoset
                   from inper in dc.Person
                   where sg.Provinces == sf.Infoid && sg.Jtgs == jt.Infoid && sg.AccidentTypeid == sglx.Infoid && sg.AccidentLevelid == sgdj.Infoid && sg.WsLevelid == wsdj.Infoid && sg.OreTypeid == kjlx.Infoid && inper.Personnumber == sg.Inpersonnumber && sg.Inpersonnumber == SessionBox.GetUserSession().PersonNumber
                   select new
        {
            sg.Id,
            sg.Accidentname,
            sg.Orename,
            sg.Deathnumber,
            sg.Zsnumber,
            sg.Qsnumber,
            sg.ZjLoss,
            sg.JjLoss,

            sf   = sf.Infoname,
            jt   = jt.Infoname,
            sglx = sglx.Infoname,
            sgdj = sgdj.Infoname,
            wsdj = wsdj.Infoname,
            kjlx = kjlx.Infoname,
            sg.Happendate,
            inper.Name,
            sg.Indate,
            sg.Sgfx
        };

        SGStore.DataSource = data;
        SGStore.DataBind();
    }
コード例 #3
0
    public void Gridload()
    {
        //绑定事故信息
        var data = from sg in dc.Accidentcase
                   from sf in dc.CsBaseinfoset
                   from jt in dc.CsBaseinfoset
                   from sglx in dc.CsBaseinfoset
                   from sgdj in dc.CsBaseinfoset
                   from wsdj in dc.CsBaseinfoset
                   from kjlx in dc.CsBaseinfoset
                   from inper in dc.Person
                   where sg.Provinces == sf.Infoid && sg.Jtgs == jt.Infoid && sg.AccidentTypeid == sglx.Infoid && sg.AccidentLevelid == sgdj.Infoid && sg.WsLevelid == wsdj.Infoid && sg.OreTypeid == kjlx.Infoid && inper.Personnumber == sg.Inpersonnumber
                   select new
        {
            sg.Id,
            sg.Accidentname,
            sg.Orename,
            sg.Deathnumber,
            sg.Zsnumber,
            sg.Qsnumber,
            sg.ZjLoss,
            sg.JjLoss,

            sf   = sf.Infoname,
            jt   = jt.Infoname,
            sglx = sglx.Infoname,
            sgdj = sgdj.Infoname,
            wsdj = wsdj.Infoname,
            kjlx = kjlx.Infoname,

            sfid   = sf.Infoid,
            jtid   = jt.Infoid,
            sglxid = sglx.Infoid,
            sgdjid = sgdj.Infoid,
            wsdjid = wsdj.Infoid,
            kjlxid = kjlx.Infoid,


            sg.Happendate,
            inper.Name,
            sg.Indate
        };

        if (!df_begin.IsNull && !df_end.IsNull)
        {
            data = data.Where(p => p.Happendate >= df_begin.SelectedDate && p.Happendate <= df_end.SelectedDate);
        }
        if (sgName.Text != "")
        {
            data = data.Where(p => p.Accidentname == sgName.Text);
        }
        if (kjName.Text != "")
        {
            data = data.Where(p => p.Orename == kjName.Text);
        }
        if (sf1.SelectedIndex > -1)
        {
            data = data.Where(p => p.sfid == int.Parse(sf1.SelectedItem.Value));
        }
        if (jt1.SelectedIndex > -1)
        {
            data = data.Where(p => p.jtid == int.Parse(jt1.SelectedItem.Value));
        }
        if (sglx1.SelectedIndex > -1)
        {
            data = data.Where(p => p.sglxid == int.Parse(sglx1.SelectedItem.Value));
        }
        if (sgdj1.SelectedIndex > -1)
        {
            data = data.Where(p => p.sgdjid == int.Parse(sgdj1.SelectedItem.Value));
        }
        if (wsdj1.SelectedIndex > -1)
        {
            data = data.Where(p => p.wsdjid == int.Parse(wsdj1.SelectedItem.Value));
        }
        if (kjlx1.SelectedIndex > -1)
        {
            data = data.Where(p => p.kjlxid == int.Parse(kjlx1.SelectedItem.Value));
        }

        if (swNumber.Text != "" && swNumber1.Text != "")
        {
            data = data.Where(p => p.Deathnumber >= int.Parse(swNumber.Text) && p.Deathnumber <= int.Parse(swNumber1.Text));
        }
        if (zsNumber.Text != "" && zsNumber1.Text != "")
        {
            data = data.Where(p => p.Zsnumber >= int.Parse(zsNumber.Text) && p.Zsnumber <= int.Parse(zsNumber1.Text));
        }
        if (qsNumber.Text != "" && qsNumber1.Text != "")
        {
            data = data.Where(p => p.Qsnumber >= int.Parse(qsNumber.Text) && p.Qsnumber <= int.Parse(qsNumber1.Text));
        }
        if (zjjjss.Text != "" && zjjjss1.Text != "")
        {
            data = data.Where(p => p.ZjLoss >= int.Parse(zjjjss.Text) && p.ZjLoss <= int.Parse(zjjjss1.Text));
        }
        if (jjjjss.Text != "" && jjjjss1.Text != "")
        {
            data = data.Where(p => p.JjLoss >= int.Parse(jjjjss.Text) && p.JjLoss <= int.Parse(jjjjss1.Text));
        }

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