Exemple #1
0
        // 註冊新分銷商
        public void Register(RegisterModel reg)
        {
            try
            {
                if (reg.PASSWORD != null)
                {
                    reg.PASSWORD  = Sha256Helper.Gethash(reg.PASSWORD);
                    reg.USER_UUID = Guid.NewGuid().ToString();

                    string[] time = reg.TIMEZONE.Split(new char[2] {
                        ',', ':'
                    });
                    reg.TIMEZONE = time[1];

                    string[] country = reg.COUNTRY_CODE.Split(new char[1] {
                        ','
                    });
                    reg.COUNTRY_CODE = country[0];
                    reg.TEL_CODE     = country[1];

                    RegisterDAL.InsCompany(reg);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }