예제 #1
0
        protected override void ResetPersonalizationBlob(WebPartManager webPartManager, string path, string userName)
        {
            ISBL.User oUser = (ISBL.User)System.Web.HttpContext.Current.Session["Admin"];

            path     = oUser.CurrentPath;
            userName = oUser.LoginID;
            base.ResetPersonalizationBlob(webPartManager, path, userName);
            oUser = null;
        }
예제 #2
0
        protected override void LoadPersonalizationBlobs(WebPartManager webPartManager, string path, string userName, ref byte[] sharedDataBlob, ref byte[] userDataBlob)
        {
            ISBL.User oUser = (ISBL.User)System.Web.HttpContext.Current.Session["Admin"];

            path     = oUser.CurrentPath;
            userName = oUser.LoginID;
            base.LoadPersonalizationBlobs(webPartManager, path, userName, ref sharedDataBlob, ref userDataBlob);
            oUser = null;
        }
예제 #3
0
파일: ISIS.cs 프로젝트: Roopashri/April
        public String InsertSearchBeforeLog(String strLoginName, String strDBIDs, String strName, String strSponsor, String strUniversity, String strPassport, String strCountry)
        {
            SqlCommand cmd         = new SqlCommand();
            String     strSearchID = "";

            try
            {
                cmd.Connection  = conn.Connection;
                cmd.CommandText = "sp_isis_goc_before_searchlog_Insert";
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.Add("@search_by_login_name", SqlDbType.VarChar, 15);
                cmd.Parameters.Add("@search_at_date_time", SqlDbType.DateTime);
                cmd.Parameters.Add("@search_on_dataset_ids", SqlDbType.VarChar, 100);
                cmd.Parameters.Add("@parameter_name", SqlDbType.VarChar, 50);
                cmd.Parameters.Add("@parameter_sponsor_name", SqlDbType.VarChar, 50);
                cmd.Parameters.Add("@parameter_university_name", SqlDbType.VarChar, 50);
                cmd.Parameters.Add("@parameter_passport_no", SqlDbType.VarChar, 50);
                cmd.Parameters.Add("@parameter_country", SqlDbType.VarChar, 50);
                cmd.Parameters["@search_by_login_name"].Value      = strLoginName;
                cmd.Parameters["@search_at_date_time"].Value       = DateTime.Now;
                cmd.Parameters["@search_on_dataset_ids"].Value     = strDBIDs;
                cmd.Parameters["@parameter_name"].Value            = strName;
                cmd.Parameters["@parameter_sponsor_name"].Value    = strSponsor;
                cmd.Parameters["@parameter_university_name"].Value = strUniversity;
                cmd.Parameters["@parameter_passport_no"].Value     = strPassport;
                cmd.Parameters["@parameter_country"].Value         = strCountry;
                conn.Open();
                conn.callingMethod = "ISBL.ISIS.InsertSearchBeforeLog";
                strSearchID        = cmd.ExecuteScalar().ToString();
                return(strSearchID);
            }
            catch (Exception ex)
            {
                ISBL.User oISBLUser    = new ISBL.User();
                string    strErrorType = "Error in InsertSearchBeforeLog";
                InsertErrorLog("0", ex.Message, strErrorType);
                string strTo      = System.Configuration.ConfigurationManager.AppSettings["GOCRecepientEmail"].ToString();
                string strFrom    = "*****@*****.**";
                string strSubject = "Error Occured in GOC";
                string strBody    = "Hello GOC Team </br></br>The following error encountered for the user : "******"</br></br>The details of the error are as follows :</br></br>" + ex.Message;
                SendGOCErrorMail(strTo, strFrom, strSubject, strBody, true);
                return("false");
            }
            finally
            {
                conn.Close();
                cmd.Dispose();
            }
        }
예제 #4
0
파일: ISIS.cs 프로젝트: Roopashri/April
        public String InsertErrorLog(String strSearchSerialNo, String strErrorMesg, String strErrorType)
        {
            SqlCommand cmd    = new SqlCommand();
            String     status = "";

            try
            {
                cmd.Connection  = conn.Connection;
                cmd.CommandText = "sp_isis_goc_errorlog_Insert";
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.Add("@search_serial_no", SqlDbType.Int);
                cmd.Parameters.Add("@error_type", SqlDbType.VarChar, 50);
                cmd.Parameters.Add("@error_message", SqlDbType.VarChar, 200);
                cmd.Parameters.Add("@error_date_time", SqlDbType.DateTime);
                cmd.Parameters["@search_serial_no"].Value = Convert.ToInt32(strSearchSerialNo);
                cmd.Parameters["@error_type"].Value       = strErrorType;
                cmd.Parameters["@error_message"].Value    = strErrorMesg;
                cmd.Parameters["@error_date_time"].Value  = DateTime.Now;
                conn.Open();
                conn.callingMethod = "ISBL.ISIS.InsertErrorLog";
                status             = cmd.ExecuteScalar().ToString();
                return(status);
            }
            catch (Exception ex)
            {
                ISBL.User oISBLUser  = new ISBL.User();
                string    strTo      = System.Configuration.ConfigurationManager.AppSettings["GOCRecepientEmail"].ToString();
                string    strFrom    = "*****@*****.**";
                string    strSubject = "Error Occured in GOCErrorLog";
                string    strBody    = "Hello GOC Team </br></br>The following error encountered for the user : "******"</br></br>The details of the error are as follows :</br></br>" + ex.Message;
                SendGOCErrorMail(strTo, strFrom, strSubject, strBody, true);
                return("false");
            }
            finally
            {
                conn.Close();
                cmd.Dispose();
            }
        }