Exemplo n.º 1
0
        public ActionResult CMS030_GetDocumentNoName(string strDocumentCode)
        {
            ObjectResultData res = new ObjectResultData();

            try
            {
                IDocumentHandler handler = ServiceContainer.GetService <IDocumentHandler>() as IDocumentHandler;
                var list = handler.GetDocumentNoNameByDocumentCode(strDocumentCode);

                foreach (var item in list)
                {
                    if (CommonUtil.GetCurrentLanguage() == CommonValue.DEFAULT_LANGUAGE_EN)
                    {
                        item.DocumentNoName = item.DocumentNoNameEN;
                    }
                    else if (CommonUtil.GetCurrentLanguage() == CommonValue.DEFAULT_LANGUAGE_JP)
                    {
                        item.DocumentNoName = item.DocumentNoNameJP;
                    }
                    else
                    {
                        item.DocumentNoName = item.DocumentNoNameLC;
                    }
                }

                return(Json(list));
            }
            catch (Exception ex)
            {
                res.AddErrorMessage(ex);
                return(Json(res));
            }
        }