Example #1
0
        public void LogActivityDetail(ActiivtyLogViewModel lvm)
        {
            int SiteId     = (int)System.Web.HttpContext.Current.Session["SiteId"];
            int DivisionId = (int)System.Web.HttpContext.Current.Session["DivisionId"];

            ActivityLog log = new ActivityLog()
            {
                DocTypeId     = lvm.DocTypeId,
                DocLineId     = lvm.DocLineId,
                ActivityType  = lvm.ActivityType,
                CreatedBy     = lvm.User,
                UserRemark    = lvm.UserRemark,
                Modifications = lvm.xEModifications != null?lvm.xEModifications.ToString() : "",
                                    CreatedDate    = DateTime.Now,
                                    DocNo          = lvm.DocNo,
                                    DocId          = lvm.DocId,
                                    DocDate        = lvm.DocDate,
                                    Narration      = lvm.Narration,
                                    ControllerName = lvm.ControllerName,
                                    ActionName     = lvm.ActionName,
                                    DocStatus      = lvm.DocStatus,
                                    SiteId         = SiteId,
                                    DivisionId     = DivisionId,
                                    ObjectState    = Model.ObjectState.Added,
            };

            _LogRepository.Add(log);
            _unitOfWork.Save();
        }
Example #2
0
        public ActiivtyLogViewModel Map(ActiivtyLogViewModel nvm)
        {
            this.ActivityType    = nvm.ActivityType;
            this.DocTypeId       = nvm.DocTypeId;
            this.DocId           = nvm.DocId;
            this.DocLineId       = nvm.DocLineId;
            this.DocNo           = nvm.DocNo;
            this.DocDate         = nvm.DocDate;
            this.DocStatus       = nvm.DocStatus;
            this.xEModifications = nvm.xEModifications;

            return(this);
        }