コード例 #1
0
        public int InsertState(State theState)
        {
            string Context = this.GetType().FullName.ToString();

            try
            {
                return(StateIntegration.InsertState(theState));
            }
            catch (Exception ex)
            {
                throw (new Exception(Context, ex));
            }
        }
コード例 #2
0
        public List <State> GetAllStatesByCountryId(int countryId)
        {
            //The below piece of code is working fine and should be un commented before after adding the states to the table
            //string UniqueKey = "GetAllStatesByCountryId_" + countryId.ToString();
            //if(HttpRuntime.Cache[UniqueKey] == null)
            //{
            //   List<State> StateList = StateIntegration.GetAllStatesByCountryId(countryId);
            //    HttpRuntime.Cache[UniqueKey] = StateList;
            //}
            //return (List<State>)(HttpRuntime.Cache[UniqueKey]);

            string Context = this.GetType().FullName.ToString();

            try
            {
                return(StateIntegration.GetAllStatesByCountryId(countryId));
            }
            catch (Exception ex)
            {
                throw (new Exception(Context, ex));
            }
        }