public static String GetSubCategory(String Name, String Category, String Result)
        {
            try
            {
                return(SubCategories.Select(String.Format("Name = '{0}' AND Category = '{1}'", Name, Category))[0][Result].ToString());
            }
            catch (Exception ex)
            {
                IMessageHandler.ShowError(ISystemMessages.DevelopmentError(ex.Message));
            }

            return(null);
        }
Exemple #2
0
 public void ExecuteStoredProc(SqlCommand Command)
 {
     try
     {
         Connect();
         try
         {
             BeginTran();
             Command.Connection  = VConnection;
             Command.Transaction = VTransaction;
             Command.ExecuteNonQuery();
             CommitTran();
         }
         catch (Exception ex)
         {
             Rollback();
             IMessageHandler.ShowError(ISystemMessages.ErrorExecutingCommand(ex.Message));
         }
     }
     finally
     {
         Disconnect();
     }
 }