public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var result = new UserService(transaction.Context).SetVisitor(VisitorId, UserLoginId, UserAgentTypeId, SecurityToken, VisitorArg);
         transaction.CompleteTransaction();
         return(result);
     }
 }
 public CommandResult Execute()
 {
     using (var transacion = new TransactionScope())
     {
         var result = new CommonDataService(transacion.Context).CreateOfferItemType(Sequence, Description, OfferTypeId, UserLoginId);
         transacion.CompleteTransaction();
         return(result);
     }
 }
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var result = new UserJobService(transaction.Context).CreateJobPost(UserId, JobPostCommandArg, JobPostDetails, UserLoginId);
         transaction.CompleteTransaction();
         return(result);
     }
 }
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var result = new UserService(transaction.Context).CreateUser(UserCommandArg);
         transaction.CompleteTransaction();
         return(result);
     }
 }
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         new UserJobService(transaction.Context).CreateJobOfferes(JobPostId, OfferedUserIds, UserLoginId);
         transaction.CompleteTransaction();
         return(Utility.CommandSuccess());
     }
 }
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var result = new UserService(transaction.Context).ActivateUserAccount(UserName, VerificationCode,
                                                                               PhoneNumber, NewPassword);
         transaction.CompleteTransaction();
         return(result);
     }
 }
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var userService = new UserService(transaction.Context);
         userService.ChangeUserStatus(PersonId, StatusId, UserLoginId);
         transaction.CompleteTransaction();
         return(Utility.CommandSuccess());
     }
 }
Exemple #8
0
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var contentService = new ContentService(transaction.Context);
         contentService.RemoveContent(ContentId);
         transaction.CompleteTransaction();
         return(Utility.CommandSuccess());
     }
 }
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var commonDataService = new CommonDataService(transaction.Context);
         commonDataService.CreateGeoAssoces(GeoAssocArgs);
         transaction.CompleteTransaction();
         return(Utility.CommandSuccess());
     }
 }
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var contactService = new ContactService(transaction.Context);
         contactService.CreateContactInfos(ContactInfoArgs, PersonId, UserLoginId);
         transaction.CompleteTransaction();
         return(Utility.CommandSuccess());
     }
 }
Exemple #11
0
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var contentService = new ContentService(transaction.Context);
         contentService.SetProfilePicture(UserId, ContentId);
         transaction.CompleteTransaction();
         return(Utility.CommandSuccess());
     }
 }
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var userService = new UserService(transaction.Context);
         userService.CreateUpdatePhysicalInfo(PhysicalInformationArg, PersonId, UserLoginId);
         transaction.CompleteTransaction();
         return(Utility.CommandSuccess());
     }
 }
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var userService     = new UserService(transaction.Context);
         var categoryService = new CategoryService(transaction.Context);
         var personalInfo    = userService.CreatePersonalInfo(PersonalInformationArg, UserLoginId);
         categoryService.CreateCategories(CategoryIds, personalInfo.PersonId, UserLoginId);
         transaction.CompleteTransaction();
         return(Utility.CommandSuccess(personalInfo.PersonId));
     }
 }
Exemple #14
0
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var fileUploadService = new ContentService(transaction.Context);
         foreach (var uplodableArg in UplodableArgs)
         {
             fileUploadService.SaveUplodable(uplodableArg, PersonId, UserLoginId);
         }
         transaction.CompleteTransaction();
         return(Utility.CommandSuccess());
     }
 }
Exemple #15
0
        public async void AddContents(List <ContentArg> contentArgs, string userId, string userLoginId)
        {
            var contents = new List <Content>();

            foreach (var content in contentArgs)
            {
                contents.Add(await AddContent(content, userId, userLoginId));
            }
            using (var context = new TransactionScope())
            {
                var contentRepo = new AppRepository(context.Context);
                contentRepo.Content().AddRange(contents);
                context.CompleteTransaction();
            }
        }
        public CommandResult Execute()
        {
            User user;

            using (var transaction = new TransactionScope())
            {
                user = new UserService(transaction.Context).CreateAgent(PersonalInformationArg);
                transaction.CompleteTransaction();
            }
            var contentService = new ContentService();

            contentService.AddContents(new List <ContentArg> {
                LogoImage
            }, user.PersonId, UserLoginId);
            return(Utility.CommandSuccess());
        }
        public CommandResult Execute()
        {
            using (var transaction = new TransactionScope())
            {
                var userService     = new UserService(transaction.Context);
                var categoryService = new CategoryService(transaction.Context);
                var contactService  = new ContactService(transaction.Context);
                var contentServie   = new ContentService(transaction.Context);

                var user = userService.RegisterModel(PersonalInformationArg, PhysicalInformationArg);
                userService.AddSkills(SkillArgs, user.PersonId, user.UserLoginId);
                categoryService.CreateCategories(CategoryTypeIds, user.PersonId, user.UserLoginId);
                contactService.CreateContactInfos(ContactInfoArgs, user.PersonId, user.UserLoginId);
                contentServie.AddContents(ContentArgs, user.PersonId, user.UserLoginId);
                transaction.CompleteTransaction();

                return(Utility.CommandSuccess(user.PersonId));
            }
        }
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var userService     = new UserService(transaction.Context);
         var categoryService = new CategoryService(transaction.Context);
         var contactService  = new ContactService(transaction.Context);
         userService.UpdatePersonalInfo(PersonalInformationArg, PersonId, UserLoginId);
         if (CategoryTypeIds != null)
         {
             categoryService.UpdateCategories(CategoryTypeIds, PersonId, UserLoginId);
         }
         if (ContactInfoArgs.Count > 0)
         {
             contactService.UpdateContactInfos(PersonId, ContactInfoArgs, UserLoginId);
         }
         transaction.CompleteTransaction();
         return(Utility.CommandSuccess());
     }
 }