Пример #1
0
 private void SignUp()
 {
     try
     {
         UserInfoEntity uie = new UserInfoEntity();
         Console.WriteLine("Enter Name");
         uie.Name = Console.ReadLine();
         Console.WriteLine("Enter Address");
         uie.Address = Console.ReadLine();
         Console.WriteLine("Enter Mobile Number");
         uie.MobNo = long.Parse(Console.ReadLine());
         Console.WriteLine("Enter Email");
         uie.EmailID = Console.ReadLine();
         Console.WriteLine("Enter Password");
         uie.Password = Console.ReadLine();
         Console.WriteLine("Enter RoleID");
         Dictionary <int, string> res = bal.GetRoles();
         foreach (KeyValuePair <int, string> kvp in res)
         {
             Console.Write(kvp.Key + "." + kvp.Value);
             Console.Write("\t");
         }
         uie.RoleID = int.Parse(Console.ReadLine());
         var success = bal.AddNewUser(uie);
         if (success)
         {
             PrintStars();
             Console.WriteLine("New User Created Successfully");
             PrintStars();
             Console.Clear();
             Login();
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }