Пример #1
0
        public ActionResult PreviewMultiple(Guid UN)
        {
            IEWSList ilist = new BsEWSList();
            IWord    iword = new BsWord();

            CurrentList = ilist.GetList(UN, GetCurrentUser().ID, true);

            foreach (var item in CurrentList.EWSListWord)
            {
                if (item.EWSWord.Description == null)
                {
                    EWSWord    word          = new EWSWord();
                    Translator t             = new Translator();
                    string     TranslateText = item.EWSWord.WordBody.Trim();
                    string     result        = t.Translate(TranslateText, "English", "Turkish");
                    word.UN          = item.EWSWord.UN;
                    word.UserID      = item.EWSWord.UserID;
                    word.Description = result;
                    word.WordBody    = item.EWSWord.WordBody;

                    item.EWSWord.Description = result;
                    word = iword.WordSave(word);
                }
                item.EWSWord.CurrentSequence = CurrentSequence;
            }
            return(PartialView(CurrentList));
        }
Пример #2
0
        public ActionResult GetWordList(Guid ListID)
        {
            IEWSList ilist = new BsEWSList();
            EWSList  list  = ilist.GetList(ListID, GetCurrentUser().ID);

            return(PartialView("WordGrid", list.EWSListWord.ToList()));
        }
Пример #3
0
        public ActionResult ListDetail(Guid listID)
        {
            IEWSList ilist = new BsEWSList();

            EWSList list = ilist.GetList(listID, GetCurrentUser().ID);

            return(View(list));
        }
Пример #4
0
        public ActionResult PreviewTable(Guid UN)
        {
            IEWSList ilist = new BsEWSList();

            CurrentList = ilist.GetList(UN, GetCurrentUser().ID, true);

            return(PartialView(CurrentList));
        }
Пример #5
0
        public ActionResult SelectedList(Guid UN)
        {
            IEWSList ilist = new BsEWSList();

            CurrentList     = ilist.GetList(UN, GetCurrentUser().ID, true);
            CurrentSequence = 0;

            return(Content(CurrentList.EWSListWord.Count().ToString()));
        }
Пример #6
0
        public ActionResult AddWordToList(Guid listID)
        {
            EWSList  list  = new EWSList();
            IEWSList ilist = new BsEWSList();

            list = ilist.GetList(listID, GetCurrentUser().ID);

            return(View(list));
        }
Пример #7
0
        public ActionResult GetMultipleList(Guid listID, string type)
        {
            IEWSList ilist = new BsEWSList();

            ViewBag.ListID = listID;
            ViewBag.type   = type;
            EWSList list = ilist.GetList(listID, GetCurrentUser().ID);

            return(PartialView(list));
        }
Пример #8
0
        public ActionResult Preview(Guid listID, string type)
        {
            IEWSList ilist = new BsEWSList();

            EWSList list = ilist.GetList(listID, GetCurrentUser().ID);

            ViewBag.ListID = listID;
            ViewBag.type   = type;

            return(PartialView("Onebyone", list));
        }
Пример #9
0
        public ActionResult Preview(Guid listID)
        {
            IEWSList ilist = new BsEWSList();

            EWSList list = ilist.GetList(listID, GetCurrentUser().ID, true);

            ViewBag.ListID = listID;

            CurrentList     = list;
            CurrentSequence = 0;
            return(View("EWSListDetail", list));
        }
Пример #10
0
        public List <EWSList> GetWordListByWordUN(Guid wordUN, int userID)
        {
            IRepositoryBase <EWSListWord> _repListWord = new RepositoryBase <EWSListWord>();

            List <EWSList> result = new List <EWSList>();

            List <EWSListWord> listKnown = _repListWord.GetList(p => p.WordUN == wordUN);

            IEWSList ilist = new BsEWSList();

            foreach (var item in listKnown)
            {
                EWSList list = ilist.GetList((Guid)item.ListUN, userID, true);
                result.Add(list);
            }
            return(result);
        }