public void LoadDatas()
 {
     var dao = new DaoUser();
     DataTable dataTable = dao.GetUserAccounts();
     if (dataTable == null || dataTable.Rows.Count <= 0) return;
     BindRepeater(rptAccounts, dataTable);
 }
        public void SetFullInfo()
        {
            var dao = new DaoUser();
            DataTable infoTable = dao.GetFullUserInforById(Convert.ToInt32(UserId));

            FirstName = infoTable.Rows[0]["FirstName"].ToString();
            LastName = infoTable.Rows[0]["LastName"].ToString();
            DateBirthDay = Convert.ToDateTime(infoTable.Rows[0]["DateOfBirth"]);
            Sex = new Sex(infoTable.Rows[0]["SexID"].ToString(), infoTable.Rows[0]["SexName"].ToString());
            PhoneNumber = infoTable.Rows[0]["PhoneNumber"].ToString();
            Races = new Races(infoTable.Rows[0]["RaceID"].ToString(), infoTable.Rows[0]["RaceName"].ToString());
            Province = new Province( infoTable.Rows[0]["ProvinceID"].ToString(),infoTable.Rows[0]["ProvinceName"].ToString());
            District = new District(infoTable.Rows[0]["DistrictID"].ToString(), infoTable.Rows[0]["DistrictName"].ToString(),
                Province, Convert.ToInt32(infoTable.Rows[0]["Latitude"]), Convert.ToInt32(infoTable.Rows[0]["Longitude"]));
            Address = new Address(Province, District);
            JobIndustries = new JobIndustries(infoTable.Rows[0]["JobIndustryID"].ToString(),infoTable.Rows[0]["JobIndustryName"].ToString());
            MaximOfLife = infoTable.Rows[0]["MaximOfLife"].ToString();
            ThumImg = infoTable.Rows[0]["PhotoPath"].ToString();
        }
        public bool SaveInfo()
        {
            var dao = new DaoUser();
            int temp = dao.EditUserInfo(Convert.ToInt32(UserId), FirstName,LastName, DateBirthDay, Convert.ToInt32(Sex.SexId), PhoneNumber, Convert.ToInt32(JobIndustries.JobIndutriesId), Convert.ToInt32(Address.District.Id),
                Convert.ToInt32(Races.RaceId), MaximOfLife,ThumImg);
            if (temp > 0)
            {
                return true;
            }

            return false;
        }
 public DataTable GetUserInfo(int type)
 {
     try
     {
         var dao = new DaoUser();
         return dao.GetUserInfoByEmailLogin(EmailLogin, type);
     }
     catch (Exception )
     {
         return null;
     }
 }
 protected bool BlockRecruiterAcount(int recId)
 {
     var dt = new DaoUser();
     return dt.BlockAnRecruitorAcount(recId) > 0;
 }
 protected bool BlockAcount(int userId)
 {
     var dt = new DaoUser();
     return dt.BlockAnAcount(userId) > 0;
 }