Пример #1
0
    void Awake()
    {
        mDBUIInstance = this;
        _tran         = transform;
        _gameObject   = gameObject;

        SmartRelease.RemoveAsset_WhenGameUI();
    }
Пример #2
0
 void JumpToGameView()
 {
     if (status.check(LoginStatus.All))
     {
         if (!Core.Data.playerManager.RTData.IsRegister)
         {
             Core.SM.beforeLoadLevel(SceneName.LOGIN_SCENE, SceneName.GameMovie);
             Application.LoadLevel(SceneName.GameMovie);
             SmartRelease.SmartRemoveAsset_1();
         }
         else
         {
             Core.SM.beforeLoadLevel(SceneName.LOGIN_SCENE, SceneName.MAINUI);
             Application.LoadLevel(SceneName.MAINUI);
             SmartRelease.SmartRemoveAsset_1();
         }
     }
 }
        public List <SmartRelease> GetSmartReleasesByDate(DateTime date)
        {
            const string storedProcedureName = Constants.GetSmartReleasesByDate;

            using (SqlConnection connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["DBConnection"].ConnectionString))
            {
                SqlCommand command = new SqlCommand(storedProcedureName, connection);
                command.CommandType = CommandType.StoredProcedure;

                command.Parameters.Add(Constants.ReleaseDate, SqlDbType.Date);
                command.Parameters[Constants.ReleaseDate].Value = date;

                connection.Open();
                SqlDataReader reader = command.ExecuteReader();

                SmartRelease        release       = null;
                List <SmartRelease> Releases_list = new List <SmartRelease> ();
                while (reader.Read())
                {
                    release = new SmartRelease
                    {
                        ReleaseID = Convert.ToInt32(reader.GetValue(0)),

                        ReleaseDate = Convert.ToDateTime(reader.GetValue(1)),

                        AmountAccrued = reader.GetValue(2) == DBNull.Value ? 0 : Convert.ToDouble(reader.GetValue(2)),

                        AmountPaid = reader.GetValue(3) == DBNull.Value ? 0 : Convert.ToDouble(reader.GetValue(3)),

                        EmployeeFullName = reader.GetValue(4).ToString(),
                    };

                    Releases_list.Add(release);
                }
                connection.Close();
                return(Releases_list);
            }
        }