Exemplo n.º 1
0
        public IHttpActionResult GetAllLanguage()
        {
            TmsLanguageResourcesBll resourcesBll = new TmsLanguageResourcesBll();
            var resources = resourcesBll.GetAll();
            var qry       = from lm in _languageBll.GetAll()
                            join lr in resources on lm.Id equals lr.LanguageId
                            select new { lm.Id, lm.Description, lm.ScreenName, lm.ControlType, lm.CreationDate, lm.CurrentStage, lm.Notes, lm.UserId, lm.Entry };

            return(Ok(qry.ToList().OrderBy(e => e.Entry)));
        }
Exemplo n.º 2
0
 public IHttpActionResult GetLanguageManifestByContext(string sValue)
 {
     if (sValue != null)
     {
         TmsLanguageResourcesBll resourcesBll = new TmsLanguageResourcesBll();
         var resources = resourcesBll.GetAll();
         var qry       = from lm in _languageBll.GetAll()
                         .Where(lm => lm.Notes.Contains(sValue))
                         join lr in resources on lm.Id equals lr.LanguageId
                         select new { lm.Id, lm.Description, lm.ScreenName, lm.ControlType, lm.CreationDate, lm.CurrentStage, lm.Notes, lm.UserId, lm.Entry };
         return(Ok(qry.ToList().OrderBy(e => e.Entry)));
     }
     return(Json(new { Msg = "0" }));
 }
Exemplo n.º 3
0
        //public IHttpActionResult GetCrmContact(int id)
        public IHttpActionResult GetLanguageManifestById(int id)
        {
            var contact = _languageBll.GetById(id);

            if (contact.Any())
            {
                TmsLanguageResourcesBll resourcesBll = new TmsLanguageResourcesBll();
                var resources = resourcesBll.GetAll();
                var qry       = from lm in _languageBll.GetById(id)
                                join lr in resources on lm.Id equals lr.LanguageId
                                select new { lm.Id, lm.Description, lm.ScreenName, lm.ControlType, lm.CreationDate, lm.CurrentStage, lm.Notes, lm.UserId, lm.Entry };
                return(Ok(qry.ToList().OrderBy(e => e.Entry)));
            }
            else
            {
                return(Json(new { Msg = "0", Reason = "Record set is empty!" }));
            }
        }
Exemplo n.º 4
0
 public TmsLanguageResourcesController()
 {
     _languageResourcesBll = new TmsLanguageResourcesBll();
     _languageViewModel    = new LanguageViewModel();
     _dbContext            = new PillarsaltDbContext();
 }