Esempio n. 1
0
        public string[] TmplData(QueryTmpl query)
        {
            var datas = new string[] { };
            var st    = wmsbasic.TTmplSts
                        .Where(x => x.WhId == query.WhId && x.CustId == query.CustId && x.BrandId == query.BrandId)
                        .Select(x => x.Id).FirstOrDefault();

            if (st > 0)
            {
                var tmpl = wmsbasic.TTmplPrints
                           .Where(x => x.StId == st && x.TypeCode == query.TypeCode &&
                                  x.SubTypeCode == query.SubTypeCode)
                           .FirstOrDefault();
                if (tmpl != null)
                {
                    datas = wmsbasic.TTmplPrintDs
                            .Where(x => x.TmplId == tmpl.Id)
                            .OrderBy(x => x.Seq)
                            .Select(x => x.TmplData).ToArray();
                }
            }
            return(datas);
        }
Esempio n. 2
0
        public JsonResult GetTmpl(QueryTmpl query)
        {
            var result = service.TmplData(query);

            return(new JsonResult(result));
        }