Ejemplo n.º 1
0
        public ActionResult BSOHistory(long id)
        {
            BSO          bso   = bsoBusinessLogic.BSO_GetByID(id);
            BSOBaseModel model = new BSOBaseModel(bso);

            if (bso.VisitGroupId != null)
            {
                ClientVisit clientVisit = clientBusinessLogic.ClientVisit_GetLastClientVisitInGroup((long)bso.VisitGroupId);
                model.ClientVisitId = clientVisit.Id;
                model.ClientId      = clientVisit.ClientId;
            }

            foreach (var a in model.HistoryModel)
            {
                if (model.UserId != null)
                {
                    User user = userBusinessLogic.User_Get((long)a.UserId);
                    if (user != null)
                    {
                        a.UserName = user.Lastname + " " + user.Firstname.Remove(1) + "." + " " + user.Secondname.Remove(1) + ".";
                    }
                }

                if (a.ResponsibleID != null)
                {
                    User user = userBusinessLogic.User_Get((long)a.ResponsibleID);
                    if (user != null)
                    {
                        a.ResponsibleName = user.Lastname + " " + user.Firstname.Remove(1) + "." + " " + user.Secondname.Remove(1) + ".";
                    }
                }
            }
            return(View(model));
        }
Ejemplo n.º 2
0
 public static User GetUser(long id)
 {
     return(userBusinessLogic.User_Get(id));
 }