Example #1
0
        public List <EmployViewModel> GetUserScoresByFKCode(int FKCode)
        {
            RS_ScoreExtend             extend     = new RS_ScoreExtend();
            RS_EmployScoreBFL          ebfl       = new RS_EmployScoreBFL();
            RS_EmployScoreModel        model2     = new RS_EmployScoreModel();
            RS_EmployScoreQueryModel   queryModel = new RS_EmployScoreQueryModel();
            List <EmployViewModel>     list       = new List <EmployViewModel>();
            List <RS_EmployScoreModel> list2      = new List <RS_EmployScoreModel>();

            queryModel.ManageCodeEqual = FKCode;
            list2 = ebfl.GetRS_EmployScoreList(queryModel);
            if (list2.Count > 0)
            {
                for (int i = 0; i < list2.Count; i++)
                {
                    EmployViewModel item = new EmployViewModel();
                    item.Index    = i + 1;
                    item.Code     = list2[i].Code;
                    item.UserCode = list2[i].UserCode;
                    item.UserName = extend.GetUserNameByCode(list2[i].UserCode);
                    item.Score    = list2[i].Score;
                    list.Add(item);
                }
                return(list);
            }
            return(null);
        }
Example #2
0
        public int UpDateScores(EmployViewModel evModel)
        {
            RS_EmployScoreModel objModel = new RS_EmployScoreModel();

            objModel.Code  = evModel.Code;
            objModel.Score = evModel.Score;
            RS_EmployScoreBFL ebfl = new RS_EmployScoreBFL();

            return(ebfl.Update(objModel));
        }