Ejemplo n.º 1
0
        public static void manualInit()
        {
            Comunication.getLanguages(languageTable);
            sessionPersister.currentLanguageTrial = "ქართული";
            sessionPersister.currentLanguage      = "ქართული";

            variableTable.Add("home", "");
            variableTable.Add("about", "");
            variableTable.Add("contact", "");
            variableTable.Add("login", "");
            variableTable.Add("register", "");

            variableTable.Add("default_language", "");
            variableTable.Add("registration_type", "");
            variableTable.Add("registration_user_name", "");
            variableTable.Add("registration_first_name", "");
            variableTable.Add("registration_last_name", "");
            variableTable.Add("registration_phone_number", "");
            variableTable.Add("registration_email", "");
            variableTable.Add("registration_passport_id", "");
            variableTable.Add("registration_password", "");
            variableTable.Add("registration_confirm_password", "");
            variableTable.Add("register_button", "");
            variableTable.Add("register_window_title", "");
            variableTable.Add("register_page_title", "");
            variableTable.Add("log_in_window_title", "");
            variableTable.Add("log_in_user_name", "");
            variableTable.Add("log_in_password", "");
            variableTable.Add("log_in_button", "");
            variableTable.Add("log_in_page_title", "");
        }
Ejemplo n.º 2
0
 public static bool logInCheck(string user, string pass)
 {
     if (!validateUserAndPassword(user, pass))
     {
         return(false);
     }
     return(Comunication.checkUserAndPassword(user, pass));
 }
Ejemplo n.º 3
0
        public static bool registerUser(string defaultLanguage, string accessLevel, string userName, string firstName, string lastName, string phone
                                        , string email, string password, string passportId)
        {
            string salt       = generateSalt();
            string hashedPswd = generateHashedPSWD(password, salt);

            return(Comunication.generalRegistration(defaultLanguage, accessLevel, userName, firstName, lastName, phone, email, hashedPswd, salt, passportId));
        }
Ejemplo n.º 4
0
        public static bool registerUser(string defaultLanguage, string userName, string firstName, string lastName, string phone
                                        , string email, string password)
        {
            string salt       = generateSalt();
            string hashedPswd = generateHashedPSWD(password, salt);

            return(Comunication.generalRegistration(defaultLanguage, userName, firstName, lastName, phone, email, hashedPswd, salt));
            //Debug.WriteLine(hashedPassword);
            //Debug.WriteLine();
        }
Ejemplo n.º 5
0
        public static void defaultInit()
        {
            Comunication.getLanguages(languageTable);
            sessionPersister.currentLanguageTrial = "ქართული";
            sessionPersister.currentLanguage      = "ქართული";
            Comunication.getVariableNames(variableTable);

            errorOnLogIn           = false;
            errorOnRegister        = false;
            errorOnRegisterMessage = "";
        }
Ejemplo n.º 6
0
        public static void manualInit()
        {
            Comunication.getLanguages(languageTable);
            currentLanguageTrial = "ქართული";
            currentLanguage      = "ქართული";

            variableTable.Add("home", "");
            variableTable.Add("about", "");
            variableTable.Add("contact", "");
            variableTable.Add("login", "");
            variableTable.Add("register", "");
        }
Ejemplo n.º 7
0
        //____________________ACCESS_LEVELS____________________________________________

        public static void initAccessLevelsList()
        {
            Comunication.setAccesLevelHashTable();

            foreach (DictionaryEntry levels in GlobalVariables.accessLevelsTable)
            {
                SelectListItem item = new SelectListItem()
                {
                    Text = levels.Key.ToString(), Value = levels.Value.ToString()
                };
                accessLevelsListItems.Add(item);
            }
        }
Ejemplo n.º 8
0
        public static void initVariables()
        {
            //_________________Gets_Language_List_From_DataBase___________________________________


            //________________Sets_Languages_Manually__________________________________________________



            //_________________Adds_Variables_Manually__________________________________________________



            //___________________Gets_Translated_Variable_Values_From_DataBase___________________________
            Comunication.setVariables(languageTable[currentLanguageTrial].ToString(), variableTable);
            initDropDownList();
        }
Ejemplo n.º 9
0
 //static string emailRegex=@"\w{3,100}@\w*.\w{2,11}";
 public static bool isValidMail(string mail)
 {
     /*  bool toReturn = false;
      * if (Regex.IsMatch(mail,emailRegex))
      *    toReturn=true;
      * else
      *    toReturn=false;
      *
      * return toReturn;
      * */
     try
     {
         MailAddress ad = new MailAddress(mail);
         ad = null;
         return(!Comunication.existsEMail(mail));
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Ejemplo n.º 10
0
 //______________________Language_______________________________________
 public static void initVariables()
 {
     Comunication.setVariables(languageTable[sessionPersister.currentLanguageTrial].ToString(), variableTable);
     initDropDownList();
 }
Ejemplo n.º 11
0
 public static bool userNameValidation(string userName)
 {
     return(Comunication.existsUserName(userName));
 }