Ejemplo n.º 1
0
        public List <GradingByBLL> GetByGradingId(Guid GradingId)
        {
            List <GradingByBLL> listComplete = null;;
            List <GradingByBLL> list         = new List <GradingByBLL>();

            list = GradingByDAL.GetSupervisorByGradingId(GradingId);

            EmployeeAttendanceBLL objEmp  = new EmployeeAttendanceBLL();
            List <UserBLL>        empList = new List <UserBLL>();

            empList = UserRightBLL.GetUsersWithRight("Grader");

            if (empList != null && list != null)
            {
                if (empList.Count > 0 && list.Count > 0)
                {
                    var q = from Graders in list
                            join UserDetail in empList on Graders.UserId equals UserDetail.UserId
                            select new { Graders.IsSupervisor, UserDetail.FullName };
                    listComplete = new List <GradingByBLL>();
                    foreach (var i in q)
                    {
                        GradingByBLL o = new GradingByBLL();
                        o.isSupervisor = i.IsSupervisor;
                        o.GraderName   = i.FullName;
                        listComplete.Add(o);
                    }
                }
            }



            return(listComplete);
        }
Ejemplo n.º 2
0
        public string GetSupGraderNameByGradingId(Guid GradingId)
        {
            List <GradingByBLL> list = null;

            list = GradingByDAL.GetSupervisorByGradingId(GradingId);
            if (list != null)
            {
                if (list.Count() == 1)
                {
                    GradingByBLL o = list[0];
                    return(UserRightBLL.GetUserNameByUserId(o.UserId));
                }
                else
                {
                    return("");
                }
            }
            else
            {
                return("");
            }
        }