示例#1
0
        public object GetGridDataByUnitSeq(string unitSeq)
        {
            var dicType = new TDictionaryDAL(this.db).GetModelQuery(DictionaryString.AppointmentType);

            return(db.Query <TBusinessModel>()
                   .LeftJoin(dicType, (m, t) => m.busiType.ToString() == t.Value)
                   .Where((m, t) => m.unitSeq == unitSeq)
                   .Select((m, t) => new
            {
                m.unitSeq,
                m.busiSeq,
                m.busiCode,
                m.busiName,
                busiType = t.Name,
                acceptBusi = m.acceptBusi ? "是" : "否",
                getBusi = m.getBusi ? "是" : "否",
                askBusi = m.askBusi ? "是" : "否"
            })
                   .OrderBy(k => k.unitSeq)
                   .ToList());
        }
示例#2
0
        public object GetGridData()
        {
            var dic = new TDictionaryDAL(this.db).GetModelQuery(DictionaryString.WorkState);

            return(this.db.Query <TWindowModel>()
                   .LeftJoin(dic, (w, d) => w.State == d.Value)
                   .LeftJoin <TWindowAreaModel>((w, d, a) => w.AreaName == a.id)
                   .Select((w, d, a) => new
            {
                w.ID,
                w.Name,
                w.Number,
                w.Type,
                State = d.Name,
                CallNumber = w.CallNumber,
                AreaName = a.areaName,
                Model = w
            })
                   .OrderBy(k => k.ID)
                   .ToList());
        }
示例#3
0
        public object GetGridData()
        {
            var dicState = new TDictionaryDAL(this.db).GetModelQuery(DictionaryString.WorkState);
            var dicSex   = new TDictionaryDAL(this.db).GetModelQuery(DictionaryString.UserSex);

            return(db.Query <TUserModel>()
                   .LeftJoin(dicState, (u, d) => u.State == d.Value)
                   .LeftJoin(dicSex, (u, d, s) => u.Sex == s.Value)
                   .LeftJoin <TUnitModel>((u, d, s, u2) => u.unitSeq == u2.unitSeq)
                   .Select((u, d, s, u2) => new
            {
                u.ID,
                u.Code,
                u.Name,
                u2.unitName,
                Sex = s.Name,
                State = d.Name,
                u.Photo,
                u.Remark,
                Model = u
            })
                   .OrderBy(k => k.ID)
                   .ToList());
        }