Esempio n. 1
0
    private void GVLoad(string Rid, decimal kind)
    {
        var n = from e in dc.SqsEssentialcondition
                join r in dc.SqsEssentialconditiondetail.Where(p => p.Rid == decimal.Parse(Rid)) on e.Ecid equals r.Ecid into gg
                from g in gg.DefaultIfEmpty()
                where e.Did == kind
                select new
        {
            e.Ecid,
            e.Content,
            isCheck = g.Ecid != null
        };

        ESSENTIALCONDITIONStore.DataSource = n;
        ESSENTIALCONDITIONStore.DataBind();

        var d = from a in dc.SqsDemotion
                join r in dc.SqsDemotiondetail.Where(p => p.Rid == decimal.Parse(Rid)) on a.Deid equals r.Deid into gg
                from g in gg.DefaultIfEmpty()
                where a.Did == kind
                select new
        {
            a.Deid,
            a.Content,
            isCheck = g.Deid != null
        };

        DEMOTIONStore.DataSource = d;
        DEMOTIONStore.DataBind();

        var data = from j in dc.SqsJeomcriterion
                   join i in dc.SqsKind on j.Pkindid equals i.Pkindid
                   join r in dc.SqsResultDetail.Where(p => p.Rid == decimal.Parse(Rid)) on j.Jcid equals r.Jcid into gg
                   from g in gg.DefaultIfEmpty()
                   where i.Did == kind
                   orderby j.Sort
                   select new
        {
            j.Jcid,
            j.Jccontent,
            j.Score,
            Means  = j.Means,
            Jeom   = g == null?j.Score:g.Jeom,
            Remark = g == null?"":g.Remark,
            Kind   = i.Pkindname
        };

        JeomStore.DataSource = data;
        JeomStore.DataBind();
    }
Esempio n. 2
0
    private void GVLoad(decimal kindid)
    {
        var n = from a in dc.SqsEssentialcondition
                where a.Did == kindid
                select new
        {
            a.Ecid,
            a.Content,
            isCheck = false
        };

        ESSENTIALCONDITIONStore.DataSource = n;
        ESSENTIALCONDITIONStore.DataBind();

        var d = from a in dc.SqsDemotion
                where a.Did == kindid
                select new
        {
            a.Deid,
            a.Content,
            isCheck = false
        };

        DEMOTIONStore.DataSource = d;
        DEMOTIONStore.DataBind();

        var data = from j in dc.SqsJeomcriterion
                   from i in dc.SqsKind
                   where j.Pkindid == i.Pkindid && i.Did == kindid && j.Status == "1"
                   orderby j.Sort
                   select new
        {
            j.Jcid,
            Jccontent = j.Jccontent,
            j.Score,
            Means  = j.Means,
            Jeom   = j.Score,
            Remark = "",
            Kind   = i.Pkindname
        };

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