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
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 *-------------------------------------------------------------------------------------------------------
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)
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.)
169 Views
no comments
public partial class AceMaster : System.Web.UI.MasterPage { private ViewModel _ViewModel; public ViewModel ViewModel { get { return _ViewModel; } set { _ViewModel = value; } }
212 Views
no comments
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;
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 )
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;
195 Views
no comments
public partial class DeviceMaster : System.Web.UI.MasterPage { protected override void OnInit(EventArgs e) { base.OnInit(e); GetLocalPropertiesFromSession(); } }
158 Views
no comments
using WestWind.BusinessObjects; namespace CompanyName { public class WebStoreFactory { public static busItem GetbusItem() { busItem ItemObject = new busItem(); return (busItem) WebStoreFactory.SetProperties(ItemObject);
220 Views
no comments
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);
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.
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, '.')
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
624 Views
no comments
private void GenerateReport() { ViewModel viewModel = new ViewModel(); int quoteNo = 1000; viewModel.LoadData(quoteNo); ReportViewer1.Reset(); ReportViewer1.LocalReport.ReportPath = Server.MapPath("Report2.rdlc");
520 Views
no comments
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Sample.Business { public class SampleFactory { public static busUser GetUser()
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.
528 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
