예제 #1
0
        public bool EcoEvalsChangeStatus(long evalId, Eco.EvalStatus status)
        {
            Eco.Domain.EconomicEvaluation eval = Manager.Get <Eco.Domain.EconomicEvaluation>(evalId);

            if (eval == null)
            {
                return(false);
            }

            eval.UpdateMetaInfo(GetCurrentPerson(), UC.IpAddress, UC.ProxyIpAddress);
            eval.Status = status;

            if (!Manager.IsInTransaction())
            {
                Manager.BeginTransaction();
            }

            try
            {
                Manager.SaveOrUpdate <Eco.Domain.EconomicEvaluation>(eval);
                Manager.Commit();
            }
            catch (Exception ex)
            {
                Manager.RollBack();
                return(false);
            }

            return(true);
        }
예제 #2
0
        public bool EcoEvalsAssignCurrent(long evalId)
        {
            Eco.Domain.EconomicEvaluation eval = Manager.Get <Eco.Domain.EconomicEvaluation>(evalId);

            if (eval == null)
            {
                return(false);
            }



            lm.Comol.Modules.CallForPapers.Advanced.Domain.AdvMember Member = null;
            try
            {
                Member = eval.Commission.Members.FirstOrDefault(mem => mem.Member.Id == UC.CurrentUserID);
            } catch
            {
            }

            if (Member == null)
            {
                return(false);
            }

            eval.UpdateMetaInfo(GetCurrentPerson(), UC.IpAddress, UC.ProxyIpAddress);
            eval.Status        = Eco.EvalStatus.take;
            eval.CurrentMember = Member;

            if (!Manager.IsInTransaction())
            {
                Manager.BeginTransaction();
            }

            try
            {
                Manager.SaveOrUpdate <Eco.Domain.EconomicEvaluation>(eval);
                Manager.Commit();
            }
            catch (Exception ex)
            {
                Manager.RollBack();
                return(false);
            }

            return(true);
        }