CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets for: Matt Slay
 
* See blog post: http://mattslay.com/foxpro-class-to-generate-scctext-for-all-files-in-a-project/
*
*===========================================================================
 
 
 
lnResponse = MessageBox('Run SSCText to generate ascii code files?', 3, 'Generate SCC files?')
 
If lnResponse <> 6
by Matt Slay   June 10, 2011 @ 11:44am
Tags:
254 Views
2 comments
 
*-------------------------------------------------------------------------------------------------------
* GoFish 4 Code Search Tool for Visual FoxPro
*
*    http://vfpx.codeplex.com/wikipage?title=GoFish
*-------------------------------------------------------------------------------------------------------
*-- Search Engine Sample Usage     (Updated 2011-05-18)
* 
*-- This code serves as a test suite and coding examples of how to use the GoFish Search Engine
*-------------------------------------------------------------------------------------------------------
 
by Matt Slay   April 13, 2011 @ 7:57am
Tags:
161 Views
no comments
 
Lparameters tcFileToEdit, tcMethod, tcClass, tnStartPosition
 
Do case
    Case This.IsTextFile(tcFileToEdit)
        Modify Command (tcFileToEdit) Range tnStartPosition, tnStartPosition
 
    Case JustExt(tcFileToEdit) = 'SCX'
        lcMethod = Alltrim(CsrSummarySearchResults.name)
        If !Empty(lcMethod)
            Modify Form (tcFileToEdit) Method (tcMethod)
by Matt Slay   March 23, 2011 @ 8:25am
Tags:
120 Views
no comments
 
*======================================================================================
Function MigrateParts
 
RenameTable('Part_Parts', 'PartItems')
RenameTable('Part_Files', 'PartFiles')
RenameTable('Part_Labor', 'PartLabor')
RenameTable('Part_Mtl', 'PartMaterial')
 
lcTableName = 'Parts'
RenameColumn(lcTableName, 'ipkey', lcIdColumnName, .t.)
by Matt Slay   September 09, 2010 @ 8:13pm
Tags:
169 Views
no comments
 
C#
public partial class AceMaster : System.Web.UI.MasterPage
{
    private ViewModel _ViewModel;
 
    public ViewModel ViewModel
    {
        get { return _ViewModel; }
        set { _ViewModel = value; }
    }
by Matt Slay   May 12, 2010 @ 1:32pm
Tags:
212 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Configuration;
 
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Data;
by Matt Slay   March 03, 2010 @ 12:56pm
334 Views
no comments
 
Lparameters tcFolderPath, tlOpenInExplorer
 
If Empty(tcFolderPath)
 tcFolderPath = Alltrim(this.GetFolderName())
EndIf
 
*-- Create a West Wind wwDotNetBridge object and call a .Net class to create the directory
*-- Use this rather than the Vfp "MD" command to preserver the case of the folder path names
loBridge = CreateObject('wwDotNetBridge')
loBridge.InvokeStaticMethod('System.IO.Directory', 'CreateDirectory', tcFolderPath )
by Matt Slay   February 19, 2010 @ 2:28pm
291 Views
no comments
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Multi Column Super Header</title>
<style type="text/css">
.SuperHeader {
    text-align: center;
by Matt Slay   February 12, 2010 @ 8:48am
Tags:
195 Views
no comments
 
C#
public partial class DeviceMaster : System.Web.UI.MasterPage
{
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        GetLocalPropertiesFromSession();
      }
    }
 
by Matt Slay   February 05, 2010 @ 12:28pm
Tags:
158 Views
no comments
 
C#
using WestWind.BusinessObjects;
 
namespace CompanyName
{
    public class WebStoreFactory
    {
        public static busItem GetbusItem() 
        {
            busItem ItemObject = new busItem();
            return (busItem) WebStoreFactory.SetProperties(ItemObject);
by Matt Slay   February 05, 2010 @ 9:36am
220 Views
no comments
 
C#
public int CalculateSomethingRecursively(int someNumber) 
{ 
    return doSomethingRecursively(someNumber, 0); 
} 
 
private int doSomethingRecursively(int someNumber, int level) 
{ 
    if (level >= MAX_LEVEL || !shouldKeepCalculating(someNumber)) 
        return someNumber; 
    return doSomethingRecursively(someNumber, level + 1); 
by Matt Slay   February 03, 2010 @ 1:56pm
Tags:
154 Views
no comments
 
*-- When using a wwBusProParent, you set properties on the Parent that tell it about the Child class.
*-- Then, the Parent will create the Child class for you. 
*-- You do not create the Child when writing your code, let the Parent do that.
 
*-- You need to create a VCX library and put a Child class for each Child collection in there,
*-- with its Child properties already set up. This allows the Parent to create the Child when he
*-- needs it. If you follow the path of the Get() method, you will see that the Parent creates a
*-- Child class object and attaches it to its oLineItems property. So, once your Child classes are
*-- configured in a VCX, you will not actually have to write any code to access them (unless you are
*-- doing some special case, custom coding), you just set up the Parent so he can find them.
by Matt Slay   January 29, 2010 @ 7:30am
Tags:
355 Views
no comments
 
Lparameters tlForceCaptions, tlClearPictures
 
Local loHeader AS Object
Local lcControlSource, lcField, x
 
 *-- Set the caption of all headers to match the field name of the associated column
 *-- Also, removed any bold and any header pictures 
  For x = 1 to this.ColumnCount
   lcControlSource = this.Columns(x).controlsource
   lcField = GetWordNum(lcControlSource, 2, '.')
by Matt Slay   January 28, 2010 @ 1:13pm
Tags:
246 Views
no comments
 
Lparameters toColumn
 
Local laControlSource[1], lcAlias, lcControlSource, lcControlSourceTest, lcField, lcPicture
Local lcSortDirection, lnSelect, loHeader
 
Dimension laControlSource[1]
 
 If Type('toColumn.sorting_header') <> 'O'
    Return
 Endif
by Matt Slay   January 28, 2010 @ 1:07pm
624 Views
no comments
 
C#
private void GenerateReport()
{
    ViewModel viewModel = new ViewModel();
 
    int quoteNo = 1000;
    viewModel.LoadData(quoteNo);
 
    ReportViewer1.Reset();
    ReportViewer1.LocalReport.ReportPath = Server.MapPath("Report2.rdlc");
by Matt Slay   December 28, 2009 @ 9:43pm
520 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace Sample.Business
{
    public class SampleFactory
    {
        public static busUser GetUser()
by Matt Slay   November 26, 2009 @ 11:58am
Tags: Factory
229 Views
no comments
 
*===============================================================================================
Procedure wwJobTest
 
Set Classlib To wwlm additive
 
Local loJob as 'wwJob' of 'wwLM.vcx'
 
*-- See http://therealmattslay.blogspot.com/2010/01/exploring-my-wwbusiness-extension.html for more details.
 
loJob = CreateWWBO('wwjob') &&   < -- I use a Factory method (procedure) to return the BO.
by Matt Slay   November 20, 2009 @ 10:16am
528 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate