public static bool AddQuickLink(QuickLink linkObj)
 {
     try
     {
         return(DashboardDataProvider.AddQuickLink(linkObj));
     }
     catch (Exception)
     {
         throw;
     }
 }
 public static void UpdateLink(QuickLink linkObj)
 {
     try
     {
         DashboardDataProvider.UpdateLink(linkObj);
     }
     catch (Exception)
     {
         throw;
     }
 }
 public static bool AddQuickLink(QuickLink linkObj)
 {
     try
     {
         return (DashboardDataProvider.AddQuickLink(linkObj));
     }
     catch (Exception)
     {
         
         throw;
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Connects to database and update quick link.
        /// </summary>
        /// <param name="linkObj">QuickLink object.</param>
        /// <returns>Returns true if updated successfully.</returns>
        public static bool UpdateLink(QuickLink linkObj)
        {
            string     sp      = "[dbo].[usp_DashboardQuickLinkUpdate]";
            SQLHandler sagesql = new SQLHandler();

            try
            {
                List <KeyValuePair <string, object> > ParamCollInput = new List <KeyValuePair <string, object> >();
                ParamCollInput.Add(new KeyValuePair <string, object>("@DisplayName", linkObj.DisplayName));
                ParamCollInput.Add(new KeyValuePair <string, object>("@URL", linkObj.URL));
                ParamCollInput.Add(new KeyValuePair <string, object>("@ImagePath", linkObj.ImagePath));
                ParamCollInput.Add(new KeyValuePair <string, object>("@QuickLinkID", linkObj.QuickLinkID));
                ParamCollInput.Add(new KeyValuePair <string, object>("@PageID", linkObj.PageID));
                ParamCollInput.Add(new KeyValuePair <string, object>("@IsActive", linkObj.IsActive));
                sagesql.ExecuteNonQuery(sp, ParamCollInput);

                return(true);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public static bool AddQuickLink(QuickLink linkObj)
        {
            string sp = "[dbo].[usp_DashboardQuickLinkAdd]";
            SQLHandler sagesql = new SQLHandler();
            try
            {
                List<KeyValuePair<string, object>> ParamCollInput = new List<KeyValuePair<string, object>>();
                ParamCollInput.Add(new KeyValuePair<string, object>("@DisplayName", linkObj.DisplayName));
                ParamCollInput.Add(new KeyValuePair<string, object>("@URL", linkObj.URL));
                ParamCollInput.Add(new KeyValuePair<string, object>("@ImagePath", linkObj.ImagePath));
                ParamCollInput.Add(new KeyValuePair<string, object>("@DisplayOrder",linkObj.DisplayOrder));
                ParamCollInput.Add(new KeyValuePair<string, object>("@PageID", linkObj.PageID));
                ParamCollInput.Add(new KeyValuePair<string, object>("@IsActive", linkObj.IsActive));

                sagesql.ExecuteNonQuery(sp, ParamCollInput);

                return true;
            }
            catch (Exception)
            {

                throw;
            }
        }
 public static void UpdateLink(QuickLink linkObj)
 {
     try
     {
         DashboardDataProvider.UpdateLink(linkObj);
     }
     catch (Exception)
     {
         
         throw;
     }
 }