Wednesday, 18 July 2012
Monday, 20 February 2012
Tuesday, 30 March 2010
Wednesday, 6 January 2010
How do you write transactions better
public abstract class TransactionWorkOrder
{
protected Object[] m_Parameters;
protected Object m_Result;
///
/// For each service, a sub-classed WorkOrder must implement the
/// to do the actual work with the business logic.
///
public abstract void Run();
public Object PerformWork(params Object[] parameters) {
//start transaction code here
// Do the actual work...
Run(); //Commit or rollback transaction here return m_result;
}
}
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class TransactionWorkOrderAttribute : Attribute {
public TransactionWorkOrderAttribute ();
}
{
protected Object[] m_Parameters;
protected Object m_Result;
///
/// For each service, a sub-classed WorkOrder must implement the
Run
function/// to do the actual work with the business logic.
///
public abstract void Run();
public Object PerformWork(params Object[] parameters) {
//start transaction code here
// Do the actual work...
Run(); //Commit or rollback transaction here return m_result;
}
}
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class TransactionWorkOrderAttribute : Attribute {
public TransactionWorkOrderAttribute ();
}
Monday, 23 November 2009
How do we remove Remote desktop session when we reach maximum number of connections
What to do when we reach maximum number of connections- Run
qwinsta /server:servername to figure out who is currently logged on.- Contact anyone on the list, and have them kill their session.- If not contactable, feel free to run
rwinsta XX /server:servername , where XX stands for Session ID (obtained from qwinsta).XX : Session name
qwinsta /server:servername to figure out who is currently logged on.- Contact anyone on the list, and have them kill their session.- If not contactable, feel free to run
rwinsta XX /server:servername , where XX stands for Session ID (obtained from qwinsta).XX : Session name
How do i edit readonly property to writable in .net
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Collections.Specialized;
using System.Reflection;
namespace TestMultiThreading
{
///
/// Summary description for WebForm3.
///
public class WebForm3 : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
int queryStringCount = Request.QueryString.Count ;
NameValueCollection QS = Request.QueryString;
QS = (NameValueCollection)Request.GetType().GetField("_queryString", BindingFlags.NonPublic BindingFlags.Instance).GetValue(Request);
PropertyInfo readOnlyInfo = QS.GetType().GetProperty("IsReadOnly", BindingFlags.NonPublic BindingFlags.Instance);
readOnlyInfo.SetValue(QS, false, null);
QS["parametername"] = "parameterValue";
readOnlyInfo.SetValue(QS, true, null);
queryStringCount = Request.QueryString.Count;
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Collections.Specialized;
using System.Reflection;
namespace TestMultiThreading
{
///
/// Summary description for WebForm3.
///
public class WebForm3 : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
int queryStringCount = Request.QueryString.Count ;
NameValueCollection QS = Request.QueryString;
QS = (NameValueCollection)Request.GetType().GetField("_queryString", BindingFlags.NonPublic BindingFlags.Instance).GetValue(Request);
PropertyInfo readOnlyInfo = QS.GetType().GetProperty("IsReadOnly", BindingFlags.NonPublic BindingFlags.Instance);
readOnlyInfo.SetValue(QS, false, null);
QS["parametername"] = "parameterValue";
readOnlyInfo.SetValue(QS, true, null);
queryStringCount = Request.QueryString.Count;
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
Monday, 10 March 2008
Things i never
Yes,
i also want to become a blogger.
i don't know why....
i might like to read Kodakarapuranam,kochutresyya.........
i wish i could do it.........
i also want to become a blogger.
i don't know why....
i might like to read Kodakarapuranam,kochutresyya.........
i wish i could do it.........
Subscribe to:
Posts (Atom)