예제 #1
0
 public void Update(ShareContactDetailBM model)
 {
     uow.ShareContactDetailRepository.Update(ConvertToDM(model));
     uow.Save();
 }
예제 #2
0
        public JsonResult ShareContactDetail(int Id, string Message)
        {
            ShareContactDetailBL shareContactDetailBL = new ShareContactDetailBL();
            ShareContactDetailBM shareContactDetailBM = new ShareContactDetailBM();
            UserBM userObj = SessionManager.InstanceCreator.Get<UserBM>(SessionKey.User);
            if (userObj != null)
            {
                shareContactDetailBM.CurrentUserId = userObj.Id;
                shareContactDetailBM.ShareUserId = Id;
                shareContactDetailBM.Message = Message;
                shareContactDetailBM.CreatedBy = userObj.Id;
                shareContactDetailBM.CreationDate = DateTime.Now;
                shareContactDetailBL.Create(shareContactDetailBM);
                return Json("Changes Saved Successfully.", JsonRequestBehavior.AllowGet);
            }
            else
            {

                return Json("Error-Please Login.", JsonRequestBehavior.AllowGet);
            }
        }
예제 #3
0
        private ShareContactDetail ConvertToDM(ShareContactDetailBM model)
        {
            return new ShareContactDetail
            {

                 Id=model.Id,
              CurrentUserId=model.CurrentUserId,
              ShareUserId=model.ShareUserId,
              Message=model.Message,
              CreationDate=model.CreationDate,
              CreatedBy=model.CreatedBy,
              ModificationDate=model.ModificationDate,
              ModifiedBy=model.ModifiedBy,

              IsDeleted=model.IsDeleted

            };
        }