public void SetCurrentInfo(string companyCode, string userCode) { SPData objData = new SPData(); DataSet dsCurrentInfo = objData.GetUserCurrentInfo(companyCode, userCode); try { System.Web.HttpContext.Current.Session["Comp_Code"] = companyCode; System.Web.HttpContext.Current.Session["User_Code"] = userCode; System.Web.HttpContext.Current.Session["User_Name"] = dsCurrentInfo.Tables[0].Rows[0]["User_Name"].ToString(); System.Web.HttpContext.Current.Session["Employee_Name"] = dsCurrentInfo.Tables[0].Rows[0]["Employee_Name"].ToString(); System.Web.HttpContext.Current.Session["Region_Code"] = dsCurrentInfo.Tables[0].Rows[0]["Region_Code"].ToString(); System.Web.HttpContext.Current.Session["Region_Name"] = dsCurrentInfo.Tables[0].Rows[0]["Region_Name"].ToString(); System.Web.HttpContext.Current.Session["User_Type_Code"] = dsCurrentInfo.Tables[0].Rows[0]["User_Type_Code"].ToString(); System.Web.HttpContext.Current.Session["User_Type_Name"] = dsCurrentInfo.Tables[0].Rows[0]["User_Type_Name"].ToString(); System.Web.HttpContext.Current.Session["S_Id"] = System.Web.HttpContext.Current.Session.SessionID + DateTime.Now; } finally { dsCurrentInfo.Dispose(); } }