コード例 #1
0
 public void Update(ShareContactDetailBM model)
 {
     uow.ShareContactDetailRepository.Update(ConvertToDM(model));
     uow.Save();
 }
コード例 #2
0
ファイル: HomeController.cs プロジェクト: Vasu1990/ProWorld
        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

            };
        }