Ejemplo n.º 1
0
        private void GetMyInfoData()
        {
            try
            {
                if (ListUtils.MyUserInfo.Count == 0)
                {
                    var sqlEntity = new SqLiteDatabase();
                    sqlEntity.GetDataMyInfo();
                    sqlEntity.Dispose();
                }

                var dataUser = ListUtils.MyUserInfo.FirstOrDefault();
                if (dataUser != null)
                {
                    string liveWith = QuickDateTools.GetLiveWith(Convert.ToInt32(dataUser.LiveWith));
                    if (Methods.FunString.StringNullRemover(liveWith) != "-----")
                    {
                        IdLiveWith       = Convert.ToInt32(dataUser.LiveWith);
                        EdtLiveWith.Text = liveWith;
                    }

                    string car = QuickDateTools.GetCar(Convert.ToInt32(dataUser.Car));
                    if (Methods.FunString.StringNullRemover(car) != "-----")
                    {
                        IdCar       = Convert.ToInt32(dataUser.Car);
                        EdtCar.Text = car;
                    }

                    string religion = QuickDateTools.GetReligion(Convert.ToInt32(dataUser.Religion));
                    if (Methods.FunString.StringNullRemover(religion) != "-----")
                    {
                        IdReligion       = Convert.ToInt32(dataUser.Religion);
                        EdtReligion.Text = religion;
                    }

                    string smoke = QuickDateTools.GetSmoke(Convert.ToInt32(dataUser.Smoke));
                    if (Methods.FunString.StringNullRemover(smoke) != "-----")
                    {
                        IdSmoke       = Convert.ToInt32(dataUser.Smoke);
                        EdtSmoke.Text = smoke;
                    }

                    string drink = QuickDateTools.GetDrink(Convert.ToInt32(dataUser.Drink));
                    if (Methods.FunString.StringNullRemover(drink) != "-----")
                    {
                        IdDrink       = Convert.ToInt32(dataUser.Drink);
                        EdtDrink.Text = drink;
                    }

                    string travel = QuickDateTools.GetTravel(Convert.ToInt32(dataUser.Travel));
                    if (Methods.FunString.StringNullRemover(travel) != "-----")
                    {
                        IdTravel       = Convert.ToInt32(dataUser.Travel);
                        EdtTravel.Text = travel;
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }