Ejemplo n.º 1
0
            private static void CreateUserInProfile(string username, ReimbursementMethod reimbursementMethod, string firstName, string lastName, string manager, string costCenter)
            {
                var profile = ProfileBase.Create(username);

                profile.SetPropertyValue("PreferredReimbursementMethod", Enum.GetName(typeof(ReimbursementMethod), reimbursementMethod));
                profile.SetPropertyValue("FirstName", firstName);
                profile.SetPropertyValue("LastName", lastName);
                profile.SetPropertyValue("CostCenter", costCenter);
                profile.SetPropertyValue("Manager", manager);
                profile.Save();
            }
Ejemplo n.º 2
0
            private static void CreateProfile()
            {
                //var provider = new TableStorageProfileProvider();
                //provider.Initialize("TableStorageProfileProvider", new NameValueCollection { { "applicationName", ApplicationName } });

                string username = @"ADATUM\johndoe";
                ReimbursementMethod reimbursementMethod = ReimbursementMethod.Cash;

                CreateUserInProfile(username, reimbursementMethod, "John", "Doe", @"ADATUM\mary", CostCenters.CustomerService);

                username            = @"ADATUM\mary";
                reimbursementMethod = ReimbursementMethod.Check;
                CreateUserInProfile(username, reimbursementMethod, "Mary", "May", @"ADATUM\bob", CostCenters.CustomerService);

                username            = @"ADATUM\bob";
                reimbursementMethod = ReimbursementMethod.Check;
                CreateUserInProfile(username, reimbursementMethod, "Bob", "Smith", "", CostCenters.CustomerService);
            }
 private static void CreateUserInProfile(string username, ReimbursementMethod reimbursementMethod, string firstName, string lastName, string manager, string costCenter)
 {
     var profile = ProfileBase.Create(username);
     profile.SetPropertyValue("PreferredReimbursementMethod", Enum.GetName(typeof (ReimbursementMethod), reimbursementMethod));
     profile.SetPropertyValue("FirstName", firstName);
     profile.SetPropertyValue("LastName", lastName);
     profile.SetPropertyValue("CostCenter", costCenter);
     profile.SetPropertyValue("Manager", manager);
     profile.Save();
 }