Пример #1
0
 /// <summary>
 /// Connects to database and returns search procedure name by search procedure ID.
 /// </summary>
 /// <param name="SageFrameSearchProcedureID">Search procedure ID.</param>
 /// <returns>Search procedure.</returns>
 public SageFrameSearchProcedureInfo SageFrameSearchProcedureGet(string SageFrameSearchProcedureID)
 {
     try
     {
         List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >();
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@SageFrameSearchProcedureID", SageFrameSearchProcedureID));
         SQLHandler sagesql = new SQLHandler();
         SageFrameSearchProcedureInfo objSpIno = sagesql.ExecuteAsObject <SageFrameSearchProcedureInfo>("dbo.sp_SageFrameSearchProcedureGet", ParaMeterCollection);
         return(objSpIno);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Пример #2
0
        /// <summary>
        /// Connects to database and adds or updates SageFrame search
        /// </summary>
        /// <param name="objInfo">Object of SageFrameSearchProcedureInfo class.</param>
        /// <param name="PortalID">Portal ID.</param>
        /// <param name="AddedBy">Search added user's name.</param>
        public void SageFrameSearchProcedureAddUpdate(SageFrameSearchProcedureInfo objInfo, int PortalID, string AddedBy)
        {
            try
            {
                List <KeyValuePair <string, string> > ParaMeterCollection = new List <KeyValuePair <string, string> >();

                ParaMeterCollection.Add(new KeyValuePair <string, string>("@SageFrameSearchProcedureID", objInfo.SageFrameSearchProcedureID.ToString()));
                ParaMeterCollection.Add(new KeyValuePair <string, string>("@SageFrameSearchTitle", objInfo.SageFrameSearchTitle));
                ParaMeterCollection.Add(new KeyValuePair <string, string>("@SageFrameSearchProcedureName", objInfo.SageFrameSearchProcedureName.ToString()));
                ParaMeterCollection.Add(new KeyValuePair <string, string>("@SageFrameSearchProcedureExecuteAs", objInfo.SageFrameSearchProcedureExecuteAs));
                ParaMeterCollection.Add(new KeyValuePair <string, string>("@IsActive", objInfo.IsActive.ToString()));
                ParaMeterCollection.Add(new KeyValuePair <string, string>("@AddedOn", objInfo.AddedOn.ToString()));
                ParaMeterCollection.Add(new KeyValuePair <string, string>("@PortalID", PortalID.ToString()));
                ParaMeterCollection.Add(new KeyValuePair <string, string>("@AddedBy", AddedBy));
                SQLHandler sagesql = new SQLHandler();
                sagesql.ExecuteNonQuery("dbo.sp_SageFrameSearchProcedureAddUpdate", ParaMeterCollection);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
 private void SaveExtension()
 {
     try
     {
         int SageFrameSearchProcedureID = 0;
         if (Session["EditID"] != null)
         {
             //Update
             SageFrameSearchProcedureID = Int32.Parse(Session["EditID"].ToString());
         }
         SageFrameSearchProcedureInfo objInfo = new SageFrameSearchProcedureInfo();
         objInfo.AddedBy = GetUsername;
         objInfo.AddedOn = DateTime.Now;
         objInfo.DeletedBy = GetUsername;
         objInfo.DeletedOn = DateTime.Now;
         objInfo.IsActive = true;
         objInfo.IsDeleted = false;
         objInfo.IsModified = false;
         objInfo.PortalID = GetPortalID;
         objInfo.SageFrameSearchProcedureExecuteAs = txtSageFrameSearchProcedureExecuteAs.Text.Trim();
         objInfo.SageFrameSearchProcedureID = SageFrameSearchProcedureID;
         objInfo.SageFrameSearchProcedureName = txtSageFrameSearchProcedureName.Text.Trim();
         objInfo.SageFrameSearchTitle = txtSageFrameSearchTitle.Text.Trim();
         objInfo.UpdatedBy = GetUsername;
         objInfo.UpdatedOn = DateTime.Now;
         SageFrameSearch SFH = new SageFrameSearch();
         SFH.SageFrameSearchProcedureAddUpdate(objInfo, GetPortalID, GetUsername);
         ShowMessage(SageMessageTitle.Information.ToString(), GetSageMessage("SageFrameSearch", "SearchExtensionSavedSuccessfully"), "", SageMessageType.Success);
         ClearForm();
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Пример #4
0
        public void SageFrameSearchProcedureAddUpdate(SageFrameSearchProcedureInfo objInfo, int PortalID, string AddedBy)
        {
            try
            {
                List<KeyValuePair<string, string>> ParaMeterCollection = new List<KeyValuePair<string, string>>();

                ParaMeterCollection.Add(new KeyValuePair<string, string>("@SageFrameSearchProcedureID", objInfo.SageFrameSearchProcedureID.ToString()));
                ParaMeterCollection.Add(new KeyValuePair<string, string>("@SageFrameSearchTitle", objInfo.SageFrameSearchTitle));
                ParaMeterCollection.Add(new KeyValuePair<string, string>("@SageFrameSearchProcedureName", objInfo.SageFrameSearchProcedureName.ToString()));
                ParaMeterCollection.Add(new KeyValuePair<string, string>("@SageFrameSearchProcedureExecuteAs", objInfo.SageFrameSearchProcedureExecuteAs));
                ParaMeterCollection.Add(new KeyValuePair<string, string>("@IsActive", objInfo.IsActive.ToString()));
                ParaMeterCollection.Add(new KeyValuePair<string, string>("@AddedOn", objInfo.AddedOn.ToString()));
                ParaMeterCollection.Add(new KeyValuePair<string, string>("@PortalID", PortalID.ToString()));
                ParaMeterCollection.Add(new KeyValuePair<string, string>("@AddedBy", AddedBy));
                SQLHandler sagesql = new SQLHandler();
                sagesql.ExecuteNonQuery("dbo.sp_SageFrameSearchProcedureAddUpdate", ParaMeterCollection);
            }
            catch (Exception e)
            {
                throw e;
            }
        }