Ejemplo n.º 1
0
 public MembershipCreateStatus CreateUser(string userName, string password, string email, string fullName)
 {
     using (var sl = new SystemLogic())
     {
         var creationstatus = sl.CreateUser(userName, email, password, fullName);
         return creationstatus
                    ? MembershipCreateStatus.Success
                    : MembershipCreateStatus.DuplicateUserName;
     }
 }
        public void CreateDebugData()
        {
            using (SystemLogic sl = new SystemLogic())
            {
                sl.CreateUser("Snidd", "*****@*****.**", "magnus", "Magnus Kjellberg");
                sl.CreateUser("Mats", "*****@*****.**", "mats", "Mats Törnros");
                sl.CreateUser("Rikard", "*****@*****.**", "rikard", "Rikard Stenlund");

                var dl = GetDraftLogic.DefaultDraftLogic();

                var member1 = sl.FindMember("Snidd");
                var member2 = sl.FindMember("Mats");
                var member3 = sl.FindMember("Rikard");

                var draft = dl.CreateDraft("Min draft", member1.Id, 75, true);

                dl.AddMemberToDraft(draft.Id, member1.Id, 1);
                dl.AddMemberToDraft(draft.Id, member2.Id, 2);
                dl.AddMemberToDraft(draft.Id, member3.Id, 3);

                dl.StartDraft(draft.Id, false);
            }
        }