Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 4
0
 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());
     }
 }
Exemplo n.º 6
0
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var result = new UserService(transaction.Context).ActivateUserAccount(UserName, VerificationCode,
                                                                               PhoneNumber, NewPassword);
         transaction.CompleteTransaction();
         return(result);
     }
 }
Exemplo n.º 7
0
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var userService = new UserService(transaction.Context);
         userService.ChangeUserStatus(PersonId, StatusId, UserLoginId);
         transaction.CompleteTransaction();
         return(Utility.CommandSuccess());
     }
 }
Exemplo n.º 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());
     }
 }
Exemplo n.º 10
0
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var contactService = new ContactService(transaction.Context);
         contactService.CreateContactInfos(ContactInfoArgs, PersonId, UserLoginId);
         transaction.CompleteTransaction();
         return(Utility.CommandSuccess());
     }
 }
Exemplo n.º 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());
     }
 }
Exemplo n.º 12
0
 public CommandResult Execute()
 {
     using (var transaction = new TransactionScope())
     {
         var userService = new UserService(transaction.Context);
         userService.CreateUpdatePhysicalInfo(PhysicalInformationArg, PersonId, UserLoginId);
         transaction.CompleteTransaction();
         return(Utility.CommandSuccess());
     }
 }
Exemplo n.º 13
0
 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));
     }
 }
Exemplo n.º 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());
     }
 }
Exemplo n.º 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();
            }
        }
Exemplo n.º 16
0
        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());
        }
Exemplo n.º 17
0
        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));
            }
        }
Exemplo n.º 18
0
 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());
     }
 }