A MEL tool for Maya – Shader Transparency Tools

A MEL tool for Maya – Shader Transparency Tools (I modified a little)

I modified it base on the tools that teacher provided. It can slide transparent object. The difference is mine can be minimized and maximized. It is more convinient when you modeling. Because the old one always display on the top screen, you have to move it frequently when you modeling if your screen is not wide enough. It can be placed in any folder.

After download, you must use Unzip tool (ie: winrar) to unzip it.

Download tp2_yjs

A post about maya API enviroment setup

A post about maya API enviroment setup

Hi all!
I’m preparing to develope some API…or try to do that ^_^
I’ve got microsoft visual c++ .NET 2003 (v7.1), so, does anybody can link me a tutorial to develope my first .mll? I don’t need programming hints, only how to configure Visual C++ and maya!
thanks for your attention

A post about maya API enviroment setup

Hi all!
I’m preparing to develope some API…or try to do that ^_^
I’ve got microsoft visual c++ .NET 2003 (v7.1), so, does anybody can link me a tutorial to develope my first .mll? I don’t need programming hints, only how to configure Visual C++ and maya!
thanks for your attention

Hi, welcome.

Try the following changes:

General:

1. In Extras->Options->Projects->VC++-Directories

add “C:\Program Files\Maya6.0\include” to include files,

add “C:\Program Files\Maya6.0\lib” to library files.

Per Project:

1. In Project->Properties->Konfigurationproperties->Linker->CommandLine

add “/export:initializePlugin” and “/export:uninitializePlugin”

2. In  Project->Properties->Konfigurationproperties->Linker->General

set Output File to “C:\Program Files\Maya6.0\bin\plug-ins\plugin_name.mll”

In the main cpp file add below #include “stdafx.h”:

#pragma comment(lib, “Foundation.lib”)

#pragma comment(lib, “OpenMaya.lib”)

// … Any other library that needs to be included
#include <maya/MFnPlugin.h>

In your stdafx.h file you might want to add the following:

—————————————————– stdfx.h
#define _BOOL

#include <maya/MGlobal.h>

#include <maya/MString.h>

#include <maya/MStringArray.h>

#include <maya/MEventMessage.h>

#include <maya/MUiMessage.h>

#include <maya/M3dView.h>

#include <maya/MFnNurbsCurve.h>

#include <maya/MFnUnitAttribute.h>

#include <maya/MItMeshPolygon.h>

#include <maya/MFnMesh.h>

#include <maya/MDistance.h>

#include <maya/MPxContextCommand.h>

#include <maya/MPxContext.h>

#include <maya/MEvent.h>

#include <maya/MCursor.h>

#include <maya/MFloatMatrix.h>

#include <maya/MPxModelEditorCommand.h>

#include <maya/MPx3dModelView.h>

#include <maya/MFStream.h>

#include <maya/MPxFileTranslator.h>

#include <maya/MStatus.h>

#include <maya/MPxCommand.h>

#include <maya/MSyntax.h>

#include <maya/MArgDatabase.h>

#include <maya/MFnComponent.h>

#include <maya/MFnSingleIndexedComponent.h>

#include <maya/MSyntax.h>

#include <maya/MArgParser.h>

#include <maya/MArgDatabase.h>

#include <maya/MDagModifier.h>

#include <maya/MDGModifier.h>

#include <maya/MDagMessage.h>

#include <maya/MModelMessage.h>

#include <maya/MAnimMessage.h>

#include <maya/MTime.h>

#include <maya/MAnimControl.h>

#include <maya/MIOStream.h>

#include <maya/MPxToolCommand.h>

#include <maya/MArgList.h>

#include <maya/MGlobal.h>

#include <maya/MItSelectionList.h>

#include <maya/MPoint.h>

#include <maya/MVector.h>

#include <maya/MDagPath.h>

#include <maya/MFnTransform.h>

#include <maya/MItCurveCV.h>

#include <maya/MItSurfaceCV.h>

#include <maya/MItMeshVertex.h>

#include <maya/MPxSelectionContext.h>

#include <maya/MPxContextCommand.h>

#include <maya/M3dView.h>

#include <maya/MFnCamera.h>

#include <maya/MCommandResult.h>

#include < maya/MGlobal.h >

#include < maya/M3dView.h >

#include < maya/MPxLocatorNode.h >

#include < maya/MPxSurfaceShape.h >

#include < maya/MPxSurfaceShapeUI.h >

#include < maya/MPxTransform.h >

#include < maya/MPxTransformationMatrix.h >

#include < maya/MDrawRequest.h >

#include < maya/MTypeId.h >
#include < maya/MString.h >
#include < maya/MVector.h >

#include < maya/MColor.h >

#include < maya/MPlug.h >

#include < maya/MDataBlock.h >

#include < maya/MDataHandle.h >

#include < maya/MFnNumericAttribute.h >

#include < maya/MFnTypedAttribute.h >

#include < maya/MDagPath.h >

#include < maya/MFnDagNode.h >

#include < maya/MFnTransform.h >

#include < maya/MEventMessage.h >

#include < maya/MSelectionList.h >

#include < maya/MPxCommand.h >

#include < maya/MArgList.h >

#include < maya/MFnCamera.h >

#include < maya/MItSelectionList.h >

#include < maya/MEulerRotation.h >

#include < maya/MNodeMessage.h >

#include < maya/MFnMatrixAttribute.h >

#include < maya/MStringArray.h >

#include < maya/MSceneMessage.h >

#include < maya/MFileIO.h >

#include < maya/MFnCompoundAttribute.h >

#include < maya/MConditionMessage.h >

#include < maya/MDGMessage.h >

#include < maya/MIOStream.h >

#include < maya/MPxSurfaceShape.h >

#include < maya/MPxSurfaceShapeUI.h >

#include < maya/MFnNumericAttribute.h >

#include < maya/MFnEnumAttribute.h >

#include < maya/MPoint.h >

#include < maya/MPlug.h >

#include < maya/MDrawData.h >

#include < maya/MDrawRequest.h >

#include < maya/MSelectionMask.h >

#include < maya/MSelectionList.h >

#include < maya/MDagPath.h >

#include < maya/MMaterial.h >

#include < maya/MMatrix.h >

#include < maya/MPlugArray.h >

#include < maya/MIntArray.h >

#include < maya/MPointArray.h >

#include < maya/MFnMessageAttribute.h >

void p(char *message, … );

—————————————————– stdfx.h

in your stdafx.cpp you might want to add

—————————————————– stdfx.cpp

void p(char *message, … )

{

char tempBuffer[10000];

va_list args;

va_start(args, message);

vsprintf( tempBuffer, message, args );

va_end(args);

MGlobal::displayInfo( MString( tempBuffer ) );

}

—————————————————– stdfx.cpp

In your maya shelf:

add a button containing the following mel code

catch( `loadPlugin “C:/Program Files/Maya6.0/bin/plug-ins/plugin_name.mll”`);

add a button containing the following mel code

file -f -new;

unloadPlugin “plugin_name”;

Probably somethings missing, so if you find something to add, please feel free to do it.

Post Extras: Print Post
Subject     Re: start to develope maya APInew [re: Daniel_Faust]
Posted by    winniethetwo (Few Posts)
Posted on    06/16/05 02:20 AM

so…I have to install V C++ before maya, isn’t it?and then follow your instructions…

—————————————-

http://www.moksha3d.com

a useful CG board!

Post Extras: Print Post
Subject     Re: start to develope maya APInew [re: winniethetwo]
Posted by    Daniel_Faust (Posting A Bit)
Posted on    06/16/05 02:40 AM

It does not matter which one you install first.

I did a fresh install a couple of days ago, first VC++.NET and then Maya. Mayas installation did not alter any of the General Preferences in VC++.NET, so I had to add the stuff I mentioned under General by hand.

In the “C:\Program Files\Maya6.0\devkit\pluginwizard” directory there is a zip file containing a Wizard for VS.NET and a txt file explaining how to use it. The wizard will take off most of the work that are on a per Project basis.

I don’t think that the wizards include all the headers for you, but you might start to feel that it’s a bit easier to include all of them in a central file right from the beginning instead of letting your flow break because you need to add a new include.

The printf-like p( “%d text”, counter ); function is also a nice timesaver, you can build variations from it to print errors or warnings or to the output window.

The mel code in the shelf is something the wizard will not add for you, but it also saves you a lot of time once it has been set up.

Edited by Daniel_Faust (06/16/05 02:43 AM)

Post Extras: Print Post

Several websites about maya programming

http://www.zjprogramming.com/
http://www.ewertb.com/maya/api/api.php?howto=18
http://caad.arch.ethz.ch/info/maya/manual/FileFormats/index.html
http://www.gamedev.net/reference/programming/features/mayaexporter/default.asp
http://www.alias.com/eng/products-services/maya/file/maya5_apiwhitepaper.pdf
http://www.garagegames.com
http://nehe.gamedev.net
http://www.davidgould.com/Books/CMP1/index.html

About Linear and Non Linear

Linear vs Non Linear Editing
In the early days of electronic video production, linear (tape-to-tape) editing was the only way to edit video tapes. Then, in the 1990s, non-linear editing computers became available and opened a whole new world of editing power and flexibility.

Non-linear editing was not welcomed by everyone and many editors resisted the new wave. In addition, early digital video was plagued with performance issues and uncertainty. However, the advantages of non-linear video eventually became so overwhelming that they could not be ignored.

In the 21st Century non-linear editing is king and linear editing is widely considered to be obsolete, or at least primitive. This is an understandable attitude considering the advantages of non-linear editing, but we urge you not to be too judgemental. Linear editing still has some advantages:

It is simple and inexpensive. There are very few complications with formats, hardware conflicts, etc.
For some jobs linear editing is better. For example, if all you want to do is add two sections of video together, it is a lot quicker and easier to edit tape-to-tape than to capture and edit on a hard drive.
Learning linear editing skills increases your knowledge base and versatility. According to many professional editors, those who learn linear editing first tend to become better all-round editors.
Although the “linear vs non-linear” argument is often subjective and some editors will disagree with the statements above, there can be little doubt that increasing your skill base is a good thing. There is nothing to be gained by completely rejecting linear editing, and much to be gained by adding it to your repertoire.
From: http://www.mediacollege.com/video/editing/linear/linear-vs-nonlinear.html

Setup ASP.Net 2.0 Providers

(from: http://www.aquesthosting.com/HowTo/Sql2005/Providers.aspx)
Note: The new Aquest Hosting control panel now has a page that will install your ASP.Net 2.0 Providers to your SQL database for you. All you have to do is pick your database and click the button. If you are already hosting with Aquest Hosting, then you can skip this tutorial and use the installer in the control panel.

For the rest of you, this quick tutorial will show you how to setup the ASP.Net 2.0 Providers in SQL Server 2005

To follow this tutorial, you will need ‘dbo’ permissions to your database, and if you are an Aquest Hosting customer with a SQL Server 2005 database, then you already have ‘dbo’ permissions to your database.
Requirements:

You can connect to a SQL Server 2005 database using SQL Server Management Studio, and SQL Server 2005 Express Edition, which is available free as part of Visual Web Developer which can be downloaded free from
http://go.microsoft.com/fwlink/?linkid=46255&clcid=0x409.

This tutorial is using SQL Server Management Studio, but you should be able to figure out the other tools.

Part 1: Create the script:Create the script:

1. Open the ASP.Net 2.0 command prompt on your computer by clicking “Start | All Programs | Microsoft Visual Studio 2005 | Visual Studio Tools | Visual Studio 2005 Command Prompt”.
2. Enter “aspnet_regsql.exe -A all -sqlexportonly C:\runproviders.sql” and hit the enter key.
3. *You have written the script to “C:\runproviders.sql”, so open that file, and use your text editor’s “Replace” feature to replace all occurences of “aspnetdb” with your database name.

Part 2 – Run the script:

1. Connect to your SQL Server 2005 database server.
2. Click “New Query” in the top left corner.
3. Copy and paste your sql script into the query window.
4. Click the “Parse” check mark button to see if your script is error free.
5. Click the “Execute” button to run your script.

Part 3 – Verify Roles were added:

1. Look in the Security folder under your database and see if the provider roles were added (see image). They all start with “aspnet_”.

Part 4 – Add your sql user account to the roles:

1. Clear out the text in the Query window, or open a new Query window.
2. Make sure your database is selected in the drop down list in the tool bar.
3. Add the following script to the window.

Exec sp_addrolemember ‘aspnet_Membership_FullAccess’, ‘yourUser’
go
Exec sp_addrolemember ‘aspnet_Personalization_FullAccess’, ‘yourUser’
go
Exec sp_addrolemember ‘aspnet_Profile_FullAccess’, ‘yourUser’
go
Exec sp_addrolemember ‘aspnet_Roles_FullAccess’, ‘yourUser’
go
Exec sp_addrolemember ‘aspnet_WebEvent_FullAccess’, ‘yourUser’
go
4. Replace ‘yourUser’ in each command with your sql user name.
5. Click “Parse” to check for errors.
6. Click “Execute” to run the script.

Completed:

You have now completed setting up your ASP.Net 2.0 Providers in SQL Server 2005.

sql server create table script samples

****BEGIN SQL QUERY***

if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_Actions’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)

drop table dbo.tbl_Actions

GO

if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_Authentications’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)

drop table dbo.tbl_Authentications

GO

****BEGIN SQL QUERY***

if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_Actions’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)

drop table dbo.tbl_Actions

GO

if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_Authentications’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)

drop table dbo.tbl_Authentications

GO

if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_Groups’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)

drop table dbo.tbl_Groups

GO

if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_CustomCommands’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)

drop table dbo.tbl_CustomCommands

GO

if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_EventRules’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)

drop table dbo.tbl_EventRules

GO

if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_ProtocolCommands’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)

drop table dbo.tbl_ProtocolCommands

GO

if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_ResultCodes’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)

drop table dbo.tbl_ResultCodes

GO

if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_SocketConnections’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)

drop table dbo.tbl_SocketConnections

GO

if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_Transactions’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)

drop table dbo.tbl_Transactions

GO

if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_ClientOperations’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)

drop table dbo.tbl_ClientOperations

GO

CREATE TABLE dbo.tbl_Transactions (

TransactionID numeric(18, 0) IDENTITY (1, 1) NOT NULL CONSTRAINT PK_tbl_Transactions PRIMARY KEY  CLUSTERED ,

ParentTransactionID numeric(18, 0) NULL REFERENCES tbl_Transactions(TransactionID),

TransactionObject varchar (50)  NOT NULL

)

GO

CREATE TABLE dbo.tbl_EventRules (

EventID numeric(18, 0) IDENTITY (1, 1) NOT NULL CONSTRAINT PK_tbl_EventRules PRIMARY KEY CLUSTERED,

Time_stamp datetime NOT NULL ,

SiteName varchar (50)  NULL ,

EventName varchar (50)  NULL ,

EventType varchar (50)  NULL ,

ConditionValues varchar (1000)  NULL ,

TransactionID numeric(18, 0) NOT NULL REFERENCES tbl_Transactions(TransactionID) ON DELETE CASCADE

)

GO

CREATE TABLE dbo.tbl_Actions (

ActionID numeric(18, 0) IDENTITY (1, 1) NOT NULL CONSTRAINT PK_tbl_Actions PRIMARY KEY  CLUSTERED,

Time_stamp datetime NOT NULL ,

SiteName varchar (50)  NULL ,

EventName varchar (50)  NULL ,

ActionType varchar (50)  NULL ,

Parameters varchar (1000)  NULL ,

IsFailedAction bit NULL ,

ResultID numeric(18, 0) NOT NULL ,

EventID numeric(18, 0) NOT NULL REFERENCES tbl_EventRules(EventID),

TransactionID numeric(18, 0) NOT NULL REFERENCES tbl_Transactions(TransactionID)  ON DELETE CASCADE

)

GO

CREATE TABLE dbo.tbl_Authentications (

AuthenticationID numeric(18, 0) IDENTITY (1, 1) NOT NULL CONSTRAINT PK_tbl_Authentications PRIMARY KEY  CLUSTERED,

Time_stamp datetime NOT NULL ,

RemoteIP varchar (15)  NOT NULL ,

RemotePort numeric(18, 0) NULL ,

LocalIP varchar (15)  NOT NULL ,

LocalPort numeric(18, 0) NULL ,

Protocol varchar (50)  NULL ,

SiteName varchar (50)  NULL ,

UserName varchar (50)  NULL ,

PasswordHash varchar (500)  NULL ,

SettingsLevels varchar (500)  NULL ,

ResultID numeric(18, 0) NOT NULL ,

TransactionID numeric(18, 0) NOT NULL References tbl_Transactions(TransactionID) ON DELETE CASCADE

)

GO

CREATE TABLE dbo.tbl_Groups (

GroupID numeric(18, 0) IDENTITY (1, 1) NOT NULL CONSTRAINT PK_tbl_Groups PRIMARY KEY  CLUSTERED,

GroupName varchar (50)  NULL ,

AuthenticationID numeric(18, 0) NOT NULL REFERENCES tbl_Authentications(AuthenticationID)  ON DELETE CASCADE

)

GO

CREATE TABLE dbo.tbl_CustomCommands (

CustomCommandID numeric(18, 0) IDENTITY (1, 1) NOT NULL CONSTRAINT PK_tbl_CustomCommands PRIMARY KEY CLUSTERED,

Time_stamp datetime NOT NULL ,

SiteName varchar (50)  NULL ,

Command varchar (50)  NULL ,

CommandParameters varchar (1000)  NULL ,

ExecutionTime numeric(18, 0) NULL ,

ResultID numeric(18, 0) NOT NULL ,

TransactionID numeric(18, 0) NOT NULL REFERENCES tbl_Transactions(TransactionID) ON DELETE CASCADE

)

GO

CREATE TABLE dbo.tbl_ProtocolCommands (

ProtocolCommandID numeric(18, 0) IDENTITY (1, 1) NOT NULL CONSTRAINT PK_tbl_ProtocolCommands PRIMARY KEY CLUSTERED,

Time_stamp datetime NOT NULL ,

RemoteIP varchar (15)  NULL ,

RemotePort numeric (18,0)  NULL ,

LocalIP varchar (15)  NULL ,

LocalPort numeric (18,0)  NULL ,

Protocol varchar (50)  NULL ,

SiteName varchar (50)  NULL ,

Command varchar (10)  NULL ,

CommandParameters varchar (1000)  NULL ,

FileName varchar (500)  NULL ,

VirtualFolderName varchar (500)  NULL ,

PhysicalFolderName varchar (500)  NULL ,

IsInternal numeric(18, 0) NULL ,

FileSize numeric(18, 0) NULL ,

TransferTime numeric(18, 0) NULL,

BytesTransferred numeric(18, 0) NULL ,

ResultID numeric(18, 0) NOT NULL ,

TransactionID numeric(18, 0) NOT NULL REFERENCES tbl_Transactions(TransactionID) ON DELETE CASCADE

)

GO

CREATE TABLE dbo.tbl_ResultCodes (

ResultID numeric(18, 0) NOT NULL CONSTRAINT PK_tbl_ResultCodes PRIMARY KEY CLUSTERED,

Description varchar (100)  NULL ,

Category varchar (10)  NULL

)

GO

CREATE TABLE dbo.tbl_SocketConnections (

SocketID numeric(18, 0) IDENTITY (1, 1) NOT NULL CONSTRAINT PK_tbl_SocketConnections PRIMARY KEY CLUSTERED,

Time_stamp datetime NOT NULL ,

RemoteIP varchar (15)  NULL ,

RemotePort numeric (18,0)  NULL ,

LocalIP varchar (15)  NULL ,

LocalPort numeric(18, 0) NULL ,

SiteName varchar (50)  NULL ,

ResultID numeric(18, 0) NOT NULL ,

TransactionID numeric(18, 0) NOT NULL REFERENCES tbl_Transactions(TransactionID) ON DELETE CASCADE

)

GO

CREATE TABLE dbo.tbl_ClientOperations (

ClientOperationID numeric (18, 0) IDENTITY (1, 1) NOT NULL CONSTRAINT PK_tbl_ClientOperations PRIMARY KEY  CLUSTERED ,

Time_stamp datetime NOT NULL ,

Protocol varchar (50) NULL ,

RemoteAddress varchar (50) NULL ,

RemotePort numeric (18, 0) NULL ,

Username varchar (50) NULL ,

RemotePath varchar (500) NULL ,

LocalPath varchar (500) NULL ,

Operation varchar (50) NULL ,

BytesTransferred numeric (18, 0) NULL ,

TransferTime numeric (18, 0) NULL ,

ResultID numeric (18, 0) NOT NULL ,

TransactionID numeric (18, 0) NOT NULL REFERENCES tbl_Transactions(TransactionID) ON DELETE CASCADE

)

****END SQL QUERY***

How to SORT a System.Collections.Generic.List

I have to Sort a List of Class
I have 3 Properties in my Class (EX ID,Name,Age)
In my List i have 10 objects of <Class> added
I need to sort By Id or By Name or by Age like DataView Sort.is it possible ?
Please enligten me

Thanx,
How to SORT a System.Collections.Generic.List

I have to Sort a List of Class
I have 3 Properties in my Class (EX ID,Name,Age)
In my List i have 10 objects of <Class> added
I need to sort By Id or By Name or by Age like DataView Sort.is it possible ?
Please enligten me

Thanx,

——————

There is no flexible way to sort a List by any property on it’s containing type, but you can easily create custom sorting logic, you just need to write different code for each sorting scenario. Here is a quick and dirty example:

List<Class> classList = new List<Class>();

classList.Add(new Class(24, “Jon”, 12));
classList.Add(new Class(16, “Mike”, 37));
classList.Add(new Class(48, “Peter”, 31));

// Sort by ID.
classList.Sort(delegate(Class class1, Class class2)
{
return (Comparer<int>.Default.Compare(class1.ID, class2.ID));
});

// Sort by name.
classList.Sort(delegate(Class class1, Class class2)
{
return (Comparer<string>.Default.Compare(class1.Name, class2.Name));
});

// Sort by age.
classList.Sort(delegate(Class class1, Class class2)
{
return (Comparer<int>.Default.Compare(class1.Age, class2.Age));
});

Invalid operator for data type. Operator equals add, type equals bit

When I wrote a sql server stored procedure, got a error message about bit data type when I tried to run this script:

Invalid operator for data type. Operator equals add, type equals bit.

The error msg is saying that a bit type parameter cannot be concatenated against the 2 strings. Cast it as varchar or nvarchar

The final script is like the following:

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

IF EXISTS(SELECT name FROM sysobjects WHERE name = ‘procADGetStatus4Email’ AND type = ‘P’)
BEGIN
DROP PROCEDURE dbo.procADGetStatus4Email
END
GO

/*===============================================================
Creation Date: 19 June 2007
Author:        XXXXXX
Description:     Get Status List
Tables:     StatusDomain
Revisions:
===============================================================*/
CREATE   PROCEDURE dbo.procADGetStatus4Email
@StatusCode    smallint = NULL,
@EmailSendInd    bit = NULL
AS
SET NOCOUNT ON

Declare @strSQL as nvarchar(2000)
Declare @strSQLwhere as nvarchar(2000)

select @strSQL = ‘select DISTINCT A.StatusCode,  A.Member, A.StatusShortDesc, A.StatusLongDesc,’
select @strSQL = @strSQL + ‘A.CreatedDate, A.UpdatedDate,  A.UserID, A.EmailSendInd’
select @strSQL = @strSQL + ‘ FROM dbo.StatusDomain A ‘

select @strSQLwhere = ‘ WHERE A.StatusCode > 0 ‘

IF @StatusCode is Not Null and @StatusCode <> ‘-1’
select @strSQLwhere =  @strSQLwhere + ‘ And (A.StatusCode =  ‘ + cast(@StatusCode as nvarchar) + ‘)’

IF @EmailSendInd is Not Null
select @strSQLwhere =  @strSQLwhere + ‘ And (A.EmailSendInd =  ”’ + cast(@EmailSendInd as nvarchar) + ”’)’

IF DATALENGTH(@strSQLwhere)>0
select @strSQL = @strSQL+ @strSQLwhere

select @strSQL = @strSQL + ‘ ORDER BY A.StatusCode ‘

print @strSQL

EXEC  sp_executesql @strSQL

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

GRANT  EXECUTE  ON [dbo].[procADGetStatus4Email]  TO [LMS_Readers]
GO

How To Create an ASP.NET Application from Multiple Projects for Team Development

I got this good article from Microsoft:

How To Create an ASP.NET Application from Multiple Projects for Team Development

(from: http://support.microsoft.com/kb/307467)

I copied all their content in my Blog before, and put there , nobody told me sth. about it, but yesterday I transfer my old blog to this new one, sb. else posted comment and let me know seems I can not copy all content here.

Ok, let me just copy their Summary and give the left to redirect their site.  But I am just worried about they change their URL and I will lost this article. I really need it.

SUMMARY

loadTOCNode(1, ‘summary’); This article describes how to make multiple ASP.NET projects participate in the same Web application.

You may find it useful to separate a large Web application project into multiple projects for team development of ASP.NET Web applications in Microsoft Visual Studio .NET. Microsoft recommends that you use source control software, such as Microsoft Visual SourceSafe, in all scenarios.

Developing a large Web site frequently involves several developers. These developers must be able to work on specific sections of a Web application without interfering with one another and yet still be able to use each other’s work as the project progresses. To do this, you can use a single project in a Visual Studio .NET solution. You can also separate a Web application into multiple projects by dividing the development project into units to make development easier.

You can develop Web applications in single project or multi-project Visual Studio .NET solutions. The advantages and disadvantages of each method are outlined in the sections to follow.

(… Please go to MS site to read more…. )

http://support.microsoft.com/kb/307467

ASP.NET get page name, visiting user name, function name, form name:

1: string username = Me.Page.User.Identity.Name
2: string username = System.Environment.UserName()

1: string pagename = Me.Page.GetType().Name()
2: string pagename = Request.Path.Substring(Request.ApplicationPath.Length + 1)

1: string functionname = System.Reflection.MethodBase.GetCurrentMethod().Name

1: string formname = Request.Path.Substring(Request.Path.LastIndexOf(“/”)+1);