/// <summary>
        /// Connects to database and returns RobotsInfo list for given PortalID.
        /// </summary>
        /// <param name="PortalID">PortalID</param>
        /// <returns>RobotsInfo List</returns>
        public static List<RobotsInfo> GetRobots(int PortalID)
        {
            List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
            SqlDataReader reader = null;
            try
            {
                SQLHandler Objsql = new SQLHandler();

                reader = Objsql.ExecuteAsDataReader("[dbo].[usp_SEOGetRobots]", ParaMeterCollection);
                List<RobotsInfo> lstRobots = new List<RobotsInfo>();
                while (reader.Read())
                {
                    lstRobots.Add(new RobotsInfo(reader["PageName"].ToString(), reader["TabPath"].ToString(), reader["SEOName"].ToString(), reader["Description"].ToString()));
                }
                return lstRobots;
            }
            catch (Exception)
            {

                throw;
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }

        }
        public static int AddNewList(ListInfo objList)
        {
            string sp = "[dbo].[usp_ListEntryAdd]";
            SQLHandler sagesql = new SQLHandler();
            try
            {
                List<KeyValuePair<string, object>> ParamCollInput = new List<KeyValuePair<string, object>>();
                ParamCollInput.Add(new KeyValuePair<string, object>("@ListName", objList.ListName));
                ParamCollInput.Add(new KeyValuePair<string, object>("@Value", objList.Value));
                ParamCollInput.Add(new KeyValuePair<string, object>("@Text", objList.Text));
                ParamCollInput.Add(new KeyValuePair<string, object>("@ParentID", objList.ParentID));
                ParamCollInput.Add(new KeyValuePair<string, object>("@Level", objList.Level));
                ParamCollInput.Add(new KeyValuePair<string, object>("@CurrencyCode", objList.CurrencyCode));
                ParamCollInput.Add(new KeyValuePair<string, object>("@DisplayLocale", objList.DisplayLocale));
                ParamCollInput.Add(new KeyValuePair<string, object>("@EnableDisplayOrder", objList.EnableDisplayOrder));
                ParamCollInput.Add(new KeyValuePair<string, object>("@DefinitionID", objList.DefinitionID));
                ParamCollInput.Add(new KeyValuePair<string, object>("@Description", objList.Description));
                ParamCollInput.Add(new KeyValuePair<string, object>("@PortalID", objList.PortalID));
                ParamCollInput.Add(new KeyValuePair<string, object>("@IsActive", objList.IsActive));
                ParamCollInput.Add(new KeyValuePair<string, object>("@AddedBy", objList.AddedBy));
                ParamCollInput.Add(new KeyValuePair<string, object>("@Culture", objList.Culture));

                int ListID = sagesql.ExecuteNonQueryAsGivenType<int>(sp, ParamCollInput, "@ListID");
                return ListID;
            }
            catch (Exception)
            {

                throw;
            }
        }
 /// <summary>
 /// To Bind Attribute Type dropdown
 /// </summary>
 /// <returns></returns>
 public List<AttributesInputTypeInfo> GetAttributesInputType()
 {
     List<AttributesInputTypeInfo> ml = new List<AttributesInputTypeInfo>();
     SQLHandler Sq = new SQLHandler();
     ml = Sq.ExecuteAsList<AttributesInputTypeInfo>("dbo.usp_ASPX_AttributesInputTypeGetAll");
     return ml;
 }
 public static bool UpdateStoreLocation(AspxCommonInfo aspxCommonObj, string storeName, String storeDescription, string streetName, string localityName, string city, string state, string country, string zip, double latitude, double longitude)
 {
     List<KeyValuePair<string, object>> parameterCollection = CommonParmBuilder.GetParamSPU(aspxCommonObj);
     parameterCollection.Add(new KeyValuePair<string, object>("@StoreName", storeName));
     parameterCollection.Add(new KeyValuePair<string, object>("@StoreDescription", storeDescription));
     parameterCollection.Add(new KeyValuePair<string, object>("@StreetName", streetName));
     parameterCollection.Add(new KeyValuePair<string, object>("@LocalityName", localityName));
     parameterCollection.Add(new KeyValuePair<string, object>("@City", city));
     parameterCollection.Add(new KeyValuePair<string, object>("@State", state));
     parameterCollection.Add(new KeyValuePair<string, object>("@Country", country));
     parameterCollection.Add(new KeyValuePair<string, object>("@ZIP", zip));
     parameterCollection.Add(new KeyValuePair<string, object>("@Latitude", latitude));
     parameterCollection.Add(new KeyValuePair<string, object>("@Longitude", longitude));
     try
     {
         SQLHandler sqlH = new SQLHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_StoreLocatorLocationUpdate", parameterCollection);
         return true;
     }
     catch (Exception e)
     {
         return false;
         throw e;
     }
 }
        public int AddProfile(string Name, int PropertyTypeID, string DataType, bool IsRequired, bool IsActive, DateTime AddedOn, int PortalID, string AddedBy)
        {
            try
            {
                string sp = "[dbo].[sp_ProfileAdd]";
                SQLHandler SQLH = new SQLHandler();
                List<KeyValuePair<string, object>> ParamCollInput = new List<KeyValuePair<string, object>>();

                ParamCollInput.Add(new KeyValuePair<string, object>("@Name", Name));
                ParamCollInput.Add(new KeyValuePair<string, object>("@PropertyTypeID", PropertyTypeID));
                ParamCollInput.Add(new KeyValuePair<string, object>("@DataType", DataType));
                ParamCollInput.Add(new KeyValuePair<string, object>("@IsRequired", IsRequired));
                ParamCollInput.Add(new KeyValuePair<string, object>("@IsActive", IsActive));
                ParamCollInput.Add(new KeyValuePair<string, object>("@AddedOn", AddedOn));
                ParamCollInput.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
                ParamCollInput.Add(new KeyValuePair<string, object>("@AddedBy", AddedBy));

                int PID = SQLH.ExecuteNonQueryAsGivenType<int>(sp, ParamCollInput, "@ProfileID");
                return PID;
            }
            catch (Exception)
            {

                throw;
            }
        }
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if(passBox.Text == confirmBox.Text)
     {
         SQLHandler sql = new SQLHandler();
         int status = sql.CreateUser(emailBox.Text, passBox.Text, nameBox.Text);
         if(status == 0)
         {
             statusLabel.ForeColor = Color.Green;
             statusLabel.Text = "User created successfully!";
         }
         else if(status == 1)
         {
             statusLabel.ForeColor = Color.Red;
             statusLabel.Text = "Backend error, please try again.";
         }
         else if (status == 2)
         {
             statusLabel.ForeColor = Color.Red;
             statusLabel.Text = "Name already taken.";
         }
         else if (status == 3)
         {
             statusLabel.ForeColor = Color.Red;
             statusLabel.Text = "Email already being used.";
         }
     }
     else
     {
         statusLabel.ForeColor = Color.Red;
         statusLabel.Text = "Passwords doesn't match!";
     }
 }
        public static void NotificationSaveUpdateSettings(NotificationSettingsInfo saveUpdateInfo, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List<KeyValuePair<string, object>> parameterCollection = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
                parameterCollection.Add(new KeyValuePair<string, object>("@AllActive", saveUpdateInfo.AllActive));
                parameterCollection.Add(new KeyValuePair<string, object>("@UserNotificationActive", saveUpdateInfo.UserNotificationActive));
                parameterCollection.Add(new KeyValuePair<string, object>("@UserNotificationCount", saveUpdateInfo.UserNotificationCount));
                parameterCollection.Add(new KeyValuePair<string, object>("@SubscriptionNotificationActive ", saveUpdateInfo.SubscriptionNotificationActive));
                parameterCollection.Add(new KeyValuePair<string, object>("@SubscriptionNotificationCount", saveUpdateInfo.SubscriptionNotificationCount));
                parameterCollection.Add(new KeyValuePair<string, object>("@OutofStockNotificationActive", saveUpdateInfo.OutofStockNotificationActive));
                parameterCollection.Add(new KeyValuePair<string, object>("@OutofStockNotificationCount", saveUpdateInfo.OutofStockNotificationCount));
                parameterCollection.Add(new KeyValuePair<string, object>("@ItemsLowStockNotificationActive", saveUpdateInfo.ItemsLowStockNotificationActive));
                parameterCollection.Add(new KeyValuePair<string, object>("@ItemsLowStockCount", saveUpdateInfo.ItemsLowStockCount));
                parameterCollection.Add(new KeyValuePair<string, object>("@OrdersNotificationAtive", saveUpdateInfo.OrdersNotificationAtive));
                parameterCollection.Add(new KeyValuePair<string, object>("@OrdersNotificationCount", saveUpdateInfo.OrdersNotificationCount));
                SQLHandler sqlH = new SQLHandler();
                sqlH.ExecuteNonQuery("[dbo].[usp_Aspx_NotificationSaveUpdateSettings]", parameterCollection);

            }
            catch (Exception e)
            {
                throw e;
            }
        }
 /// <summary>
 ///Connect to database and obtain active template.
 /// </summary>
 /// <param name="PortalID">PortalID</param>
 /// <returns>Object of TemplateInfo class.</returns>
 public static TemplateInfo GetActiveTemplate(int PortalID)
 {   
     SQLHandler sagesql = new SQLHandler();
     List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
     return (sagesql.ExecuteAsObject<TemplateInfo>("usp_sftemplate_GetActiveTemplate",ParaMeterCollection));
 }
    private void LoadSettingtoControl()
    {
        try
        {
            ddlSubscriptionType.Items.Clear();
            BindSubscriptionTypeList();

            List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@UserModuleID", usermoduleIDControl));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", GetPortalID));
            SQLHandler objSql = new SQLHandler();
            NewsLetterSettingsInfo newsLetterSettingObj = objSql.ExecuteAsObject<NewsLetterSettingsInfo>("dbo.sp_NewsLetterSettingsGetAll", ParaMeterCollection);

            if (newsLetterSettingObj != null)
            {
                ddlSubscriptionType.SelectedIndex = ddlSubscriptionType.Items.IndexOf(ddlSubscriptionType.Items.FindByValue(newsLetterSettingObj.SubscriptionType.ToString()));
                txtSubscriptionModuleTitle.Text = newsLetterSettingObj.SubscriptionModuleTitle.ToString();
                txtSubscriptionHelpText.Text = newsLetterSettingObj.SubscriptionHelpText.ToString();
                txtTextBoxWaterMark.Text = newsLetterSettingObj.TextBoxWaterMarkText.ToString()!=""?newsLetterSettingObj.TextBoxWaterMarkText.ToString():"Email Address Required";
                txtSubmitButtonText.Text = newsLetterSettingObj.SubmitButtonText.ToString();
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
 public TickerInfo getTickerObject(int tickerID)
 {
     List<KeyValuePair<string, object>> Parameter = new List<KeyValuePair<string, object>>();
     Parameter.Add(new KeyValuePair<string, object>("@tickerID", tickerID));
     SQLHandler sqlH = new SQLHandler();
     return sqlH.ExecuteAsObject<TickerInfo>("[usp_TickerGetByTickerID]", Parameter);
 }
 public List<ContactUsInfo> ContactUsGetAll(int portalID)
 {
     List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", portalID));
     SQLHandler sqlH = new SQLHandler();
     return sqlH.ExecuteAsList<ContactUsInfo>("sp_ContactUsGetAll", ParaMeterCollection);
 }
Example #12
0
        public static List<TemplateInfo> GetTemplateList(int PortalID, string UserName)
        {
            string sp = "[dbo].[sp_TemplateGetList]";
            SQLHandler sagesql = new SQLHandler();

            List<KeyValuePair<string, object>> ParamCollInput = new List<KeyValuePair<string, object>>();
            ParamCollInput.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
            ParamCollInput.Add(new KeyValuePair<string, object>("@Username", UserName));

            List<TemplateInfo> lstTemplate = new List<TemplateInfo>();
            try
            {
                SqlDataReader reader;
                reader = sagesql.ExecuteAsDataReader(sp, ParamCollInput);
                while (reader.Read())
                {
                    TemplateInfo obj = new TemplateInfo();
                    obj.TemplateID = int.Parse(reader["TemplateID"].ToString());
                    obj.TemplateTitle = reader["TemplateTitle"].ToString();
                    obj.PortalID = int.Parse(reader["PortalID"].ToString());
                    obj.Author = reader["Author"].ToString();
                    obj.AuthorURL = reader["AuthorURL"].ToString();
                    obj.Description = reader["Description"].ToString();
                    lstTemplate.Add(obj);
                }
                reader.Close();
                return lstTemplate;

            }
            catch (Exception ex)
            {

                throw (ex);
            }
        }
        public void SaveBannerContent(SageBannerInfo obj)
        {
            try
            {
                List<KeyValuePair<string, object>> param = new List<KeyValuePair<string, object>>();
                param.Add(new KeyValuePair<string, object>("@Caption", obj.Caption));
                param.Add(new KeyValuePair<string, object>("@ImagePath", obj.ImagePath));
                param.Add(new KeyValuePair<string, object>("@ReadMorePage", obj.ReadMorePage));
                param.Add(new KeyValuePair<string, object>("@LinkToImage", obj.LinkToImage));
                param.Add(new KeyValuePair<string, object>("@UserModuleID", obj.UserModuleID));
                param.Add(new KeyValuePair<string, object>("@BannerID", obj.BannerID));
                param.Add(new KeyValuePair<string, object>("@ImageID", obj.ImageID));
                param.Add(new KeyValuePair<string, object>("@ReadButtonText", obj.ReadButtonText));
                param.Add(new KeyValuePair<string, object>("@NavigationImage", obj.NavigationImage));
                param.Add(new KeyValuePair<string, object>("@Description", obj.Description));
                param.Add(new KeyValuePair<string, object>("@PortalID", obj.PortalID));
                param.Add(new KeyValuePair<string, object>("@CultureCode", obj.CultureCode));
                SQLHandler sagesql = new SQLHandler();
                sagesql.ExecuteNonQuery("usp_SageBannerSaveBannerContent", param);
            }
            catch (Exception ex)
            {
                throw ex;
            }

        }
       public static int CartPriceRuleAdd(CartPriceRule cartPriceRule, SqlTransaction tran, AspxCommonInfo aspxCommonObj)
       {
           List<KeyValuePair<string, object>> parameter =CommonParmBuilder.GetParamPUC(aspxCommonObj);
           parameter.Add(new KeyValuePair<string, object>("@CartPriceRuleName", cartPriceRule.CartPriceRuleName));
           parameter.Add(new KeyValuePair<string, object>("@CartPriceRuleDescription", cartPriceRule.CartPriceRuleDescription));
           parameter.Add(new KeyValuePair<string, object>("@Apply", cartPriceRule.Apply));
           parameter.Add(new KeyValuePair<string, object>("@Value", cartPriceRule.Value));
           parameter.Add(new KeyValuePair<string, object>("@ApplytoShippingAmount", cartPriceRule.ApplytoShippingAmount));
           parameter.Add(new KeyValuePair<string, object>("@DiscountQuantity", cartPriceRule.DiscountQuantity));
           parameter.Add(new KeyValuePair<string, object>("@DiscountStep", cartPriceRule.DiscountStep));
           parameter.Add(new KeyValuePair<string, object>("@FreeShipping", cartPriceRule.FreeShipping));
           parameter.Add(new KeyValuePair<string, object>("@IsFurtherProcessing", cartPriceRule.IsFurtherProcessing));
           parameter.Add(new KeyValuePair<string, object>("@FromDate", cartPriceRule.FromDate));
           parameter.Add(new KeyValuePair<string, object>("@ToDate", cartPriceRule.ToDate));
           parameter.Add(new KeyValuePair<string, object>("@Priority", cartPriceRule.Priority));
           parameter.Add(new KeyValuePair<string, object>("@IsActive", cartPriceRule.IsActive));
           try
           {
               SQLHandler sqlH = new SQLHandler();

               if (cartPriceRule.CartPriceRuleID > 0)
                   DeleteCartPricingRuleForEdit(tran, cartPriceRule.CartPriceRuleID, aspxCommonObj.PortalID);

               int cartPRID= sqlH.ExecuteNonQuery(tran, CommandType.StoredProcedure, "usp_Aspx_CartPriceRuleAdd", parameter, "@CartPriceRuleID");
               return cartPRID;

           }
           catch (Exception e)
           {
               throw e;
           }
       }
        public void ParseIPN(int orderId, string transId, string status, int storeId, int portalId, string userName, int customerId, string sessionCode)
        {
            var ph = new PayPalHandler();
            try
            {

                var ot = new OrderDetailsCollection();
                var odinfo = new OrderDetailsInfo();
                var cms = new CartManageSQLProvider();
                var cf = new CommonInfo {StoreID = storeId, PortalID = portalId, AddedBy = userName};
                // UpdateOrderDetails
            
                var sqlH = new SQLHandler();
                // use split to split array we already have using "=" as delimiter
                // WcfSession ws = new WcfSession();
                odinfo.OrderID = orderId;//ws.GetSessionVariable("OrderID");
                odinfo.ResponseReasonText = status;
                odinfo.TransactionID = transId;
                ot.ObjOrderDetails = odinfo;
                ot.ObjCommonInfo = cf;
                odinfo.OrderStatusID = 8;
                AspxOrderController.UpdateOrderDetails(ot);

               
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static void AddFile(ATTFile file)
        {
            List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalId", file.PortalId));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@UniqueId", file.UniqueId));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@VersionGuid", file.VersionGuid));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@FileName", file.FileName));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@Extension", file.Extension));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@Size", file.Size));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@ContentType", file.ContentType));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@Folder", file.Folder));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@FolderId", file.FolderId));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@IsActive", file.IsActive));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@AddedBy", file.AddedBy));
            if (file.StorageLocation == 2)
            {
                ParaMeterCollection.Add(new KeyValuePair<string, object>("@Content", file.Content));
                SQLHandler sagesql = new SQLHandler();
                sagesql.ExecuteNonQuery("usp_FileManagerAddDatabaseFile", ParaMeterCollection);
            }
            else
            {
                SQLHandler sagesql = new SQLHandler();
                sagesql.ExecuteNonQuery("usp_FileManagerAddFile", ParaMeterCollection);

            }
        }
 public void AddUpdateCoupons(int couponID, int couponTypeID, string couponCode, string couponAmount, string validateFrom, string validateTo,
 string isActive, int storeID, int portalID, string cultureName, string userName, string settingIDs, string settingValues, string portalUser_UserName)
 {
     try
     {
         List<KeyValuePair<string, object>> parameter = new List<KeyValuePair<string, object>>();
         parameter.Add(new KeyValuePair<string, object>("@CouponID", couponID));
         parameter.Add(new KeyValuePair<string, object>("@CouponTypeID", couponTypeID));
         parameter.Add(new KeyValuePair<string, object>("@CouponCode", couponCode));
         parameter.Add(new KeyValuePair<string, object>("@CouponAmount", couponAmount));
         parameter.Add(new KeyValuePair<string, object>("@ValidateFrom", validateFrom));
         parameter.Add(new KeyValuePair<string, object>("@ValidateTo", validateTo));
         parameter.Add(new KeyValuePair<string, object>("@IsActive", isActive));
         parameter.Add(new KeyValuePair<string, object>("@StoreID", storeID));
         parameter.Add(new KeyValuePair<string, object>("@PortalID", portalID));
         parameter.Add(new KeyValuePair<string, object>("@CultureName", cultureName));
         parameter.Add(new KeyValuePair<string, object>("@UserName", userName));
         parameter.Add(new KeyValuePair<string, object>("@SettingIDs", settingIDs));
         parameter.Add(new KeyValuePair<string, object>("@SettingValues", settingValues));
         parameter.Add(new KeyValuePair<string, object>("@portalUser_UserName", portalUser_UserName));
         SQLHandler sqlH = new SQLHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_AddUpdateCoupons", parameter);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public void AddUpdateUserAddress(AddressInfo addressObj,AspxCommonInfo aspxCommonObj)
 {
     List<KeyValuePair<string, object>> parameter = new List<KeyValuePair<string, object>>();
     parameter.Add(new KeyValuePair<string, object>("@AddressID", addressObj.AddressID));
     parameter.Add(new KeyValuePair<string, object>("@CustomerID", aspxCommonObj.CustomerID));
     parameter.Add(new KeyValuePair<string, object>("@FirstName", addressObj.FirstName));
     parameter.Add(new KeyValuePair<string, object>("@LastName", addressObj.LastName));
     parameter.Add(new KeyValuePair<string, object>("@Email", addressObj.Email));
     parameter.Add(new KeyValuePair<string, object>("@Company", addressObj.Company));
     parameter.Add(new KeyValuePair<string, object>("@Address1", addressObj.Address1));
     parameter.Add(new KeyValuePair<string,object>("@Address2",addressObj.Address2));
     parameter.Add(new KeyValuePair<string, object>("@City", addressObj.City));
     parameter.Add(new KeyValuePair<string, object>("@State", addressObj.State));
     parameter.Add(new KeyValuePair<string, object>("@Zip", addressObj.Zip));
     parameter.Add(new KeyValuePair<string, object>("@Phone", addressObj.Phone));
     parameter.Add(new KeyValuePair<string, object>("@Mobile", addressObj.Mobile));
     parameter.Add(new KeyValuePair<string, object>("@Fax", addressObj.Fax));
     parameter.Add(new KeyValuePair<string, object>("@WebSite", addressObj.Website));
     parameter.Add(new KeyValuePair<string, object>("@Country", addressObj.Country));
     parameter.Add(new KeyValuePair<string, object>("@IsDefaultShipping", addressObj.DefaultShipping));
     parameter.Add(new KeyValuePair<string, object>("@IsDefaultBilling", addressObj.DefaultBilling));
     parameter.Add(new KeyValuePair<string, object>("@StoreID", aspxCommonObj.StoreID));
     parameter.Add(new KeyValuePair<string, object>("@PortalID", aspxCommonObj.PortalID));
     parameter.Add(new KeyValuePair<string, object>("@UserName", aspxCommonObj.UserName));
     parameter.Add(new KeyValuePair<string, object>("@CultureName", aspxCommonObj.CultureName));
     SQLHandler sqlH = new SQLHandler();
     sqlH.ExecuteNonQuery("usp_Aspx_AddUpdateUserAddress", parameter);
 }
        /// <summary>
        /// Connects to database and returns roles details by role name.
        /// </summary>
        /// <param name="RoleName">Role name.</param>
        /// <returns>Role details.</returns>
        public RolesManagementInfo GetRoleIDByRoleName(string RoleName)
        {
            SqlDataReader reader = null;
            try
            {

                SQLHandler SQLH = new SQLHandler();
                List<KeyValuePair<string, object>> ParamCollInput = new List<KeyValuePair<string, object>>();
                ParamCollInput.Add(new KeyValuePair<string, object>("@RoleName", RoleName));
                reader = SQLH.ExecuteAsDataReader("[dbo].[sp_GetRoleIDByRoleName]", ParamCollInput);
                RolesManagementInfo objList = new RolesManagementInfo();
                while (reader.Read())
                {
                    objList.ApplicationId = new Guid(reader["ApplicationId"].ToString());
                    objList.RoleId = new Guid(reader["RoleId"].ToString());
                    objList.RoleName = reader["RoleName"].ToString();
                    objList.LoweredRoleName = reader["LoweredRoleName"].ToString();
                    objList.Description = reader["Description"].ToString();
                }
                reader.Close();
                return objList;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }
        }
        public static List<Roles> GetAllRoles(int portalID,bool isAll,string userName)
        {
            List<Roles> lstRoles = new List<Roles>();
            string StoredProcedureName = "sp_PortalRoleList";
            SQLHandler sagesql = new SQLHandler();
            List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", portalID));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@IsAll", isAll));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@UserName", userName));

            SqlDataReader SQLReader = null;
            try
            {
                SQLReader = sagesql.ExecuteAsDataReader(StoredProcedureName, ParaMeterCollection);
                while (SQLReader.Read())
                {
                    Roles obj = new Roles();
                    obj.RoleID = new Guid(SQLReader["RoleID"].ToString());
                    obj.RoleName = SQLReader["RoleName"].ToString();
                    lstRoles.Add(obj);
                }
            }
            catch(Exception)
            {

            }
            finally
            {
                if (SQLReader != null)
                {
                    SQLReader.Close();
                }
            }
            return lstRoles;
        }
 public static List<LayoutMgrInfo> GetAdminModules(int PortalID)
 {
     SQLHandler SQLH = new SQLHandler();
     List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
     return SQLH.ExecuteAsList<LayoutMgrInfo>("[dbo].[usp_ModuleManagerGetAdminModules]",ParaMeterCollection);
 }
 public static int AddNewSchedule(Schedule objSchedule)
 {
     int id = 0;
     List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@ScheduleName", objSchedule.ScheduleName));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@FullNameSpace", objSchedule.FullNamespace));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@StartDate", objSchedule.StartDate));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@EndDate", objSchedule.EndDate));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@StartHour", objSchedule.StartHour));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@StartMin", objSchedule.StartMin));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@RepeatWeeks", objSchedule.RepeatWeeks));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@RepeatDays", objSchedule.RepeatDays));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@WeekOfMonth", objSchedule.WeekOfMonth));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@EveryHour", objSchedule.EveryHours));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@EveryMin", objSchedule.EveryMin));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@ObjectDependencies", objSchedule.ObjectDependencies));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@RetryTimeLapse", objSchedule.RetryTimeLapse));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@RetryFrequencyUnit", objSchedule.RetryFrequencyUnit));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@AttachToEvent", objSchedule.AttachToEvent));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@CatchUpEnabled", objSchedule.CatchUpEnabled));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@Servers", objSchedule.Servers));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@IsEnable", objSchedule.IsEnable));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@RunningMode", (int)objSchedule.RunningMode));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@AssemblyFileName", objSchedule.AssemblyFileName));
     try
     {
         SQLHandler sagesql = new SQLHandler();
         id = sagesql.ExecuteNonQuery("usp_SchedulerAddJob", ParaMeterCollection, "@ScheduleID");
     }
     catch (Exception)
     {
         throw;
     }
     return id;
 }
 /// <summary>
 /// To Bind Attribute Type dropdown
 /// </summary>
 /// <returns></returns>
 public List<AttributesInputTypeInfo> GetAttributesInputType()
 {
     List<AttributesInputTypeInfo> ml;
     SQLHandler sqlH = new SQLHandler();
     ml = sqlH.ExecuteAsList<AttributesInputTypeInfo>("dbo.usp_Aspx_AttributesInputTypeGetAll");
     return ml;
 }
     public void AddUpdateUserAddress(int addressID, int customerID, string firstName, string lastName, string email, string company,
      string address1, string address2, string city, string state, string zip, string phone, string mobile,
 string fax,string webSite,string countryName, bool isDefaultShipping, bool isDefaultBilling, int storeID, int portalID, string userName, string cultureName)
     {
         List<KeyValuePair<string, object>> parameter = new List<KeyValuePair<string, object>>();
         parameter.Add(new KeyValuePair<string, object>("@AddressID", addressID));
         parameter.Add(new KeyValuePair<string, object>("@CustomerID", customerID));
         parameter.Add(new KeyValuePair<string, object>("@FirstName", firstName));
         parameter.Add(new KeyValuePair<string, object>("@LastName", lastName));
         parameter.Add(new KeyValuePair<string, object>("@Email", email));
         parameter.Add(new KeyValuePair<string, object>("@Company", company));
         parameter.Add(new KeyValuePair<string, object>("@Address1", address1));
         parameter.Add(new KeyValuePair<string,object>("@Address2",address2));
         parameter.Add(new KeyValuePair<string, object>("@City", city));
         parameter.Add(new KeyValuePair<string, object>("@State", state));
         parameter.Add(new KeyValuePair<string, object>("@Zip", zip));
         parameter.Add(new KeyValuePair<string, object>("@Phone", phone));
         parameter.Add(new KeyValuePair<string, object>("@Mobile", mobile));
         parameter.Add(new KeyValuePair<string, object>("@Fax", fax));
         parameter.Add(new KeyValuePair<string, object>("@WebSite", webSite));
         parameter.Add(new KeyValuePair<string, object>("@Country", countryName));
         parameter.Add(new KeyValuePair<string, object>("@IsDefaultShipping", isDefaultShipping));
         parameter.Add(new KeyValuePair<string, object>("@IsDefaultBilling", isDefaultBilling));
         parameter.Add(new KeyValuePair<string, object>("@StoreID", storeID));
         parameter.Add(new KeyValuePair<string, object>("@PortalID", portalID));
         parameter.Add(new KeyValuePair<string, object>("@UserName", userName));
         parameter.Add(new KeyValuePair<string, object>("@CultureName", cultureName));
         SQLHandler sqlH = new SQLHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_AddUpdateUserAddress", parameter);
     }
        public void SaveLinks(List<CDNInfo> objInfo)
        {
            SQLHandler sagesql = new SQLHandler();
            string sp = "[dbo].[usp_CDNSaveLink]";
            foreach (CDNInfo cdn in objInfo)
            {
                List<KeyValuePair<string, object>> ParamCollInput = new List<KeyValuePair<string, object>>();
                ParamCollInput.Add(new KeyValuePair<string, object>("@URL", cdn.URL));
                ParamCollInput.Add(new KeyValuePair<string, object>("@IsJS", cdn.IsJS));
                ParamCollInput.Add(new KeyValuePair<string, object>("@URLOrder", cdn.URLOrder));
                ParamCollInput.Add(new KeyValuePair<string, object>("@PortalID", cdn.PortalID));
                ParamCollInput.Add(new KeyValuePair<string, object>("@Mode", cdn.Mode));
                try
                {
                    sagesql.ExecuteNonQuery(sp, ParamCollInput);

                }
                catch (Exception)
                {

                    throw;
                }

            }

        }
 public static List<PricingRuleAttributeInfo> GetPricingRuleAttributes(AspxCommonInfo aspxCommonObj)
 {
     SQLHandler sqlHandler = new SQLHandler();
     List<KeyValuePair<string, object>> paramList = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
     List<PricingRuleAttributeInfo> lstPriceRuleAttr = sqlHandler.ExecuteAsList<PricingRuleAttributeInfo>("usp_Aspx_GetPricingRuleAttr", paramList);
     return lstPriceRuleAttr;
 }
 public static void DeleteSearchTerm(string Ids, AspxCommonInfo aspxCommonObj)
 {
     List<KeyValuePair<string, object>> parameter = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
     parameter.Add(new KeyValuePair<string, object>("@SearchTermID", Ids));
     SQLHandler sqlH = new SQLHandler();
     sqlH.ExecuteNonQuery("usp_Aspx_DeleteSearchTerm", parameter);
 }
        public void SaveTransactionLog(TransactionLogInfo tinfo)
        {
            try
            {
                List<KeyValuePair<string, object>> parameterCollection = new List<KeyValuePair<string, object>>();
                parameterCollection.Add(new KeyValuePair<string, object>("@TransactionID", tinfo.TransactionID));
                parameterCollection.Add(new KeyValuePair<string, object>("@PaymentGateWayID", tinfo.PaymentGatewayID));
                parameterCollection.Add(new KeyValuePair<string, object>("@PayerEmail", tinfo.PayerEmail));
                parameterCollection.Add(new KeyValuePair<string, object>("@RecieverEmail", tinfo.RecieverEmail));
                parameterCollection.Add(new KeyValuePair<string, object>("@TotalAmount", tinfo.TotalAmount));
                parameterCollection.Add(new KeyValuePair<string, object>("@CurrencyCode", tinfo.CurrencyCode));
                parameterCollection.Add(new KeyValuePair<string, object>("@PaymentStatus", tinfo.PaymentStatus));
                parameterCollection.Add(new KeyValuePair<string, object>("@OrderID", tinfo.OrderID));
                parameterCollection.Add(new KeyValuePair<string, object>("@CustomerID", tinfo.CustomerID));
                parameterCollection.Add(new KeyValuePair<string, object>("@SessionCode", tinfo.SessionCode));
                parameterCollection.Add(new KeyValuePair<string, object>("@ResponseCode", tinfo.ResponseCode));
                parameterCollection.Add(new KeyValuePair<string, object>("@ResponseReasonText", tinfo.ResponseReasonText));
                parameterCollection.Add(new KeyValuePair<string, object>("@AuthCode", tinfo.AuthCode));
                parameterCollection.Add(new KeyValuePair<string, object>("@StoreID", tinfo.StoreID));
                parameterCollection.Add(new KeyValuePair<string, object>("@PortalID", tinfo.PortalID));               
                parameterCollection.Add(new KeyValuePair<string, object>("@AddedBy", tinfo.AddedBy));

                SQLHandler sqlH = new SQLHandler();
                sqlH.ExecuteNonQuery("usp_Aspx_SaveTransactionLog", parameterCollection);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #29
0
        public void AddUpdateSageFrameSearchSetting(SageFrameSearchSettingInfo objSearchSettingInfo, int PortalID, string CultureName, string AddedBy)
        {            
            
            try
            {
                string SettingKeys = string.Empty;
                string SettingValues = string.Empty;
                //Pre pare Key value for the save;
                SettingKeys = "SearchButtonType#SearchButtonText#SearchButtonImage#SearchResultPerPage#SearchResultPageName#MaxSearchChracterAllowedWithSpace";
                SettingValues = objSearchSettingInfo.SearchButtonType.ToString() + "#" + objSearchSettingInfo.SearchButtonText + "#" +
                    objSearchSettingInfo.SearchButtonImage + "#" + objSearchSettingInfo.SearchResultPerPage.ToString() + 
                    "#" + objSearchSettingInfo.SearchResultPageName +
                    "#" + objSearchSettingInfo.MaxSearchChracterAllowedWithSpace.ToString();

                List<KeyValuePair<string, string>> ParaMeterCollection = new List<KeyValuePair<string, string>>();

                ParaMeterCollection.Add(new KeyValuePair<string, string>("@SettingKeys", SettingKeys));
                ParaMeterCollection.Add(new KeyValuePair<string, string>("@SettingValues", SettingValues));

                ParaMeterCollection.Add(new KeyValuePair<string, string>("@CultureName", CultureName));
                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_SageFrameSearchSettingValueAddUpdate", ParaMeterCollection);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        public  string GetUserAgent(int PortalID, bool IsActive)
        {

            string sp = "[dbo].[usp_UserAgentGetType]";
            SQLHandler sagesql = new SQLHandler();
            string content = "";
            SqlDataReader reader = null;
            try
            {
                List<KeyValuePair<string, object>> paramColl = new List<KeyValuePair<string, object>>();
                paramColl.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
                paramColl.Add(new KeyValuePair<string, object>("@IsActive", IsActive));
                reader = sagesql.ExecuteAsDataReader(sp, paramColl);
                while (reader.Read())
                {
                    content = reader["AgentMode"] as string;
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }
            return content;
        }
Example #31
0
        /// <summary>
        /// Connect to database and delete user.
        /// </summary>
        /// <param name="user">Object of UserInfo class.</param>
        /// <returns>True for deleted successfully.</returns>
        public static bool DeleteUser(UserInfo user)
        {
            string     sp      = "[dbo].[usp_UsersDelete]";
            SQLHandler sagesql = new SQLHandler();

            try
            {
                List <KeyValuePair <string, object> > ParamCollInput = new List <KeyValuePair <string, object> >();
                ParamCollInput.Add(new KeyValuePair <string, object>("@ApplicationName", user.ApplicationName));
                ParamCollInput.Add(new KeyValuePair <string, object>("@UserName", user.UserName));
                ParamCollInput.Add(new KeyValuePair <string, object>("@PortalID", user.PortalID));
                ParamCollInput.Add(new KeyValuePair <string, object>("@StoreID", user.StoreID));
                ParamCollInput.Add(new KeyValuePair <string, object>("@DeletedBy", user.AddedBy));
                sagesql.ExecuteNonQuery(sp, ParamCollInput);

                return(true);
            }
            catch (Exception)
            {
                throw;
            }
        }
 public int HtmlTextAdd(string UserModuleID, string Content, string CultureName, bool IsAllowedToComment, bool IsModified, bool IsActive, DateTime AddedOn, int PortalID, string AddedBy)
 {
     try
     {
         List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >();
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@UserModuleID", UserModuleID));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@Content", Content));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@CultureName", CultureName));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@IsAllowedToComment", IsAllowedToComment));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@IsModified", IsModified));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@IsActive", IsActive));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@AddedOn", AddedOn));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@PortalID", PortalID));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@AddedBy", AddedBy));
         SQLHandler Sq = new SQLHandler();
         return(Sq.ExecuteNonQueryAsGivenType <int>("dbo.sp_HtmlTextAdd", ParaMeterCollection, "@HTMLTextID"));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 public static void UpdateOrderDetails(OrderDetailsCollection orderData)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();
         parameter.Add(new KeyValuePair <string, object>("@TransactionID", orderData.ObjOrderDetails.TransactionID));
         parameter.Add(new KeyValuePair <string, object>("@OrderStatusID", orderData.ObjOrderDetails.OrderStatusID));
         parameter.Add(new KeyValuePair <string, object>("@ResponseCode", orderData.ObjOrderDetails.ResponseCode));
         parameter.Add(new KeyValuePair <string, object>("@ResponseReasonCode", orderData.ObjOrderDetails.ResponseReasonCode));
         parameter.Add(new KeyValuePair <string, object>("@ResponseReasonText", orderData.ObjOrderDetails.ResponseReasonText));
         parameter.Add(new KeyValuePair <string, object>("@StoreID", orderData.ObjCommonInfo.StoreID));
         parameter.Add(new KeyValuePair <string, object>("@PortalID", orderData.ObjCommonInfo.PortalID));
         parameter.Add(new KeyValuePair <string, object>("@AddedBy", orderData.ObjCommonInfo.AddedBy));
         parameter.Add(new KeyValuePair <string, object>("@OrderID", orderData.ObjOrderDetails.OrderID));
         SQLHandler sqlH = new SQLHandler();
         sqlH.ExecuteNonQuery("[dbo].[usp_Aspx_UpdateOrderDetails]", parameter);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Example #34
0
        public void MenuPageUpdate(string MenuIDs, SqlTransaction tran, int pageID)
        {
            try
            {
                string[] menuArr = MenuIDs.Split(',');

                List <KeyValuePair <string, object> > ParaMeterColl = new List <KeyValuePair <string, object> >
                {
                    new KeyValuePair <string, object>("@MenuIDs",
                                                      MenuIDs),
                    new KeyValuePair <string, object>("@PageID",
                                                      pageID)
                };
                SQLHandler sqlH = new SQLHandler();
                sqlH.ExecuteNonQuery(tran, CommandType.StoredProcedure, "[dbo].[usp_PageManagerMenuPageUpdate]",
                                     ParaMeterColl);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #35
0
 internal int SaveContactUsData(Contact objContactUs, string userName)
 {
     try
     {
         List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >();
         param.Add(new KeyValuePair <string, object>("@Email", objContactUs.Email));
         param.Add(new KeyValuePair <string, object>("@FirstName", objContactUs.FirstName));
         param.Add(new KeyValuePair <string, object>("@LastName", objContactUs.LastName));
         param.Add(new KeyValuePair <string, object>("@Message", objContactUs.Message));
         param.Add(new KeyValuePair <string, object>("@Address", objContactUs.Address));
         param.Add(new KeyValuePair <string, object>("@Telephone", objContactUs.Telephone));
         param.Add(new KeyValuePair <string, object>("@Website", objContactUs.Website));
         param.Add(new KeyValuePair <string, object>("@Subject", objContactUs.Subject));
         param.Add(new KeyValuePair <string, object>("@UserName", userName));
         SQLHandler sagesql = new SQLHandler();
         return(sagesql.ExecuteNonQuery("[dbo].[usp_WebBuilder_SaveContactUsData]", param, "@output"));
     }
     catch
     {
         throw;
     }
 }
Example #36
0
        int CopyObject(string text, string type)
        {
            targetObject.ObjectName = sourceObject.ObjectName;

            Status(string.Format("Copying {0}: {1}", text, targetObject.SchemaObject));

            SQLHandler.Clear();

            int size = CopyObject(type);

            if (SQLHandler.HasErrors)
            {
                Memo("Error", string.Format("Copy Schema {0}s: {1, 7} {2} WAS NOT Copied because of the following SQL Errors\r\n\r\n{3}",
                                            text, "ERROR", targetObject.ServerIDObjectName, SQLHandler.Errors));
            }
            else
            {
                Memo("Memo", string.Format("Copy Schema {0}s: {1, 7:n0} Bytes   {2}", text, size, targetObject.ObjectName));
            }

            return(size);
        }
        public int AddUpdate(MediaSettingInfo objMediaSetting)
        {
            int mediaSettingID = 0;
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >();

            param.Add(new KeyValuePair <string, object>("@MediaSettingID", objMediaSetting.MediaSettingID));
            param.Add(new KeyValuePair <string, object>("@SettingKeyValue", objMediaSetting.SettingKeyValue));
            param.Add(new KeyValuePair <string, object>("@PortalID", objMediaSetting.PortalID));
            param.Add(new KeyValuePair <string, object>("@UserModuleID", objMediaSetting.UserModuleID));
            param.Add(new KeyValuePair <string, object>("@Culture", objMediaSetting.Culture));
            SQLHandler sagesql = new SQLHandler();

            try
            {
                mediaSettingID = sagesql.ExecuteNonQuery("[dbo].[usp_MediaSetting_InsertUpdate]", param, "@NewMediaSettingID");
            }
            catch
            {
                throw;
            }
            return(mediaSettingID);
        }
Example #38
0
        /// <summary>
        /// Connect to database and sort menu.
        /// </summary>
        /// <param name="MenuItemID">MenuItemID</param>
        /// <param name="ParentID">Menu item parent ID.</param>
        /// <param name="BeforeID">Previous MenuItemID.</param>
        /// <param name="AfterID">Next MenuItemID.</param>
        /// <param name="PortalID">PortalID</param>
        public static void SortMenu(int MenuItemID, int ParentID, int BeforeID, int AfterID, int PortalID)
        {
            string     sp      = "[dbo].[usp_MenuMgrSortMenu]";
            SQLHandler sagesql = new SQLHandler();

            try
            {
                List <KeyValuePair <string, object> > ParamCollInput = new List <KeyValuePair <string, object> >();
                ParamCollInput.Add(new KeyValuePair <string, object>("@MenuItemID", MenuItemID));
                ParamCollInput.Add(new KeyValuePair <string, object>("@ParentID", ParentID));
                ParamCollInput.Add(new KeyValuePair <string, object>("@BeforeID", BeforeID));

                ParamCollInput.Add(new KeyValuePair <string, object>("@AfterID", AfterID));
                ParamCollInput.Add(new KeyValuePair <string, object>("@PortalID", PortalID));

                sagesql.ExecuteNonQuery(sp, ParamCollInput);
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #39
0
        [FunctionName(HTTP.Endpoints.VISIT)]  /* API Endpoints: /api/visit?planet=12&ship=5 */
        public static async Task <string> Visit([HttpTrigger(AuthorizationLevel.Anonymous, HTTP.POST, Route = HTTP.Endpoints.VISIT)] HttpRequest req)
        {
            try {
                string ship   = req.Query[HTTP.Endpoints.Parameters.SHIP];
                string planet = req.Query[HTTP.Endpoints.Parameters.PLANET];

                return(SQLHandler.Insert(
                           Visits.ALIAS,
                           new List <string> ()
                {
                    WrapValues(new string[] {
                        ship,
                        planet,
                        DateTime.UtcNow.ToString(SQL.Format.DATETIME)
                    })
                }
                           ));
            } catch (Exception ex) {
                return(ex.ToString());
            }
            return(new InvalidOperationException().ToString());  /* InvalidOperationException returned if attempting to mine more than asteroid has */
        }
        /// <summary>
        /// Connects to database  and adds profile details.
        /// </summary>
        /// <param name="ProfileID">Profile ID.</param>
        /// <param name="Name">Profile user's name.</param>
        /// <param name="IsActive">Set true if profile is active.</param>
        /// <param name="AddedOn">Profile added user's name.</param>
        /// <param name="PortalID">Portal ID.</param>
        /// <param name="AddedBy">Profile added user's name.</param>
        /// <returns>Returns ProfileValueID.</returns>
        public int AddProfileValue(int?ProfileID, string Name, bool IsActive, DateTime?AddedOn, int?PortalID, string AddedBy)
        {
            try
            {
                string     sp   = "[dbo].[sp_ProfileAdd]";
                SQLHandler SQLH = new SQLHandler();
                List <KeyValuePair <string, object> > ParamCollInput = new List <KeyValuePair <string, object> >();
                ParamCollInput.Add(new KeyValuePair <string, object>("@ProfileID", ProfileID));
                ParamCollInput.Add(new KeyValuePair <string, object>("@Name", Name));
                ParamCollInput.Add(new KeyValuePair <string, object>("@IsActive", IsActive));
                ParamCollInput.Add(new KeyValuePair <string, object>("@AddedOn", AddedOn));
                ParamCollInput.Add(new KeyValuePair <string, object>("@PortalID", PortalID));
                ParamCollInput.Add(new KeyValuePair <string, object>("@AddedBy", AddedBy));

                int PVID = SQLH.ExecuteNonQueryAsGivenType <int>(sp, ParamCollInput, "@ProfileValueID");
                return(PVID);
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #41
0
        public static List <MenuInfo> GetAdminMenu()
        {
            List <MenuInfo> lstPages            = new List <MenuInfo>();
            string          StoredProcedureName = "[dbo].[usp_sagemenugetadminmenu]";
            SqlDataReader   SQLReader           = null;

            try
            {
                SQLHandler sagesql = new SQLHandler();
                SQLReader = sagesql.ExecuteAsDataReader(StoredProcedureName);
                while (SQLReader.Read())
                {
                    MenuInfo objMenu = new MenuInfo();
                    objMenu.PageID        = int.Parse(SQLReader["PageID"].ToString());
                    objMenu.PageOrder     = int.Parse(SQLReader["PageOrder"].ToString());
                    objMenu.ParentID      = int.Parse(SQLReader["ParentID"].ToString());
                    objMenu.Level         = int.Parse(SQLReader["Level"].ToString());
                    objMenu.LevelPageName = SQLReader["LevelPageName"].ToString();
                    objMenu.SEOName       = SQLReader["SEOName"].ToString();
                    objMenu.TabPath       = SQLReader["TabPath"].ToString();
                    objMenu.IsVisible     = bool.Parse(SQLReader["IsVisible"].ToString());
                    objMenu.ShowInMenu    = bool.Parse(SQLReader["ShowInMenu"].ToString());
                    objMenu.PageName      = SQLReader["PageName"].ToString();
                    lstPages.Add(objMenu);
                }
                return(lstPages);
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                if (SQLReader != null)
                {
                    SQLReader.Close();
                }
            }
        }
        public static string UpdateTaskHistoryNextStartDate(int ScheduleID)
        {
            // DateTime NextStart
            List <KeyValuePair <string, object> > ParameterCollection = new List <KeyValuePair <string, object> >();

            ParameterCollection.Add(new KeyValuePair <string, object>("@ScheduleID", ScheduleID));


            string NextStart;

            try
            {
                SQLHandler sagesql = new SQLHandler();

                NextStart = sagesql.ExecuteNonQueryAsGivenType <string>("usp_ScheduleHistoryNextStartUpdate", ParameterCollection, "@ResultNextStart");
                return(NextStart);
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #43
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;
            }
        }
        public static List <MenuInfo> GetAdminMenu()
        {
            List <MenuInfo> lstPages            = new List <MenuInfo>();
            string          StoredProcedureName = "[dbo].[usp_sagemenugetadminmenu]";
            SqlDataReader   SQLReader;

            try
            {
                SQLHandler sagesql = new SQLHandler();
                SQLReader = sagesql.ExecuteAsDataReader(StoredProcedureName);
            }
            catch (Exception e)
            {
                throw e;
            }

            while (SQLReader.Read())
            {
                lstPages.Add(new MenuInfo(int.Parse(SQLReader["PageID"].ToString()), int.Parse(SQLReader["PageOrder"].ToString()), SQLReader["PageName"].ToString(), int.Parse(SQLReader["ParentID"].ToString()), int.Parse(SQLReader["Level"].ToString()), SQLReader["LevelPageName"].ToString(), SQLReader["SEOName"].ToString(), SQLReader["TabPath"].ToString(), bool.Parse(SQLReader["IsVisible"].ToString()), bool.Parse(SQLReader["ShowInMenu"].ToString())));
            }
            return(lstPages);
        }
        public static int AddShippingAddress(OrderDetailsCollection orderData, SqlTransaction tran)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();
                //  parameter.Add(new KeyValuePair<string, object>("@CustomerID", orderData.ObjOrderDetails.CustomerID));
                // parameter.Add(new KeyValuePair<string, object>("@SessionCode", orderData.ObjOrderDetails.SessionCode));
                parameter.Add(new KeyValuePair <string, object>("@FirstName", orderData.ObjShippingAddressInfo.FirstName));
                parameter.Add(new KeyValuePair <string, object>("@LastName", orderData.ObjShippingAddressInfo.LastName));
                parameter.Add(new KeyValuePair <string, object>("@Email", orderData.ObjShippingAddressInfo.EmailAddress));
                parameter.Add(new KeyValuePair <string, object>("@Company", orderData.ObjShippingAddressInfo.CompanyName));
                parameter.Add(new KeyValuePair <string, object>("@Address1", orderData.ObjShippingAddressInfo.Address));
                parameter.Add(new KeyValuePair <string, object>("@Address2", orderData.ObjShippingAddressInfo.Address2));
                parameter.Add(new KeyValuePair <string, object>("@City", orderData.ObjShippingAddressInfo.City));
                parameter.Add(new KeyValuePair <string, object>("@State", orderData.ObjShippingAddressInfo.State));
                parameter.Add(new KeyValuePair <string, object>("@Country", orderData.ObjShippingAddressInfo.Country));
                parameter.Add(new KeyValuePair <string, object>("@Zip", orderData.ObjShippingAddressInfo.Zip));
                parameter.Add(new KeyValuePair <string, object>("@Phone", orderData.ObjShippingAddressInfo.Phone));
                parameter.Add(new KeyValuePair <string, object>("@Mobile", orderData.ObjShippingAddressInfo.Mobile));
                parameter.Add(new KeyValuePair <string, object>("@Fax", orderData.ObjShippingAddressInfo.Fax));
                parameter.Add(new KeyValuePair <string, object>("@WebSite", orderData.ObjShippingAddressInfo.WebSite));
                parameter.Add(new KeyValuePair <string, object>("@UserName", orderData.ObjShippingAddressInfo.EmailAddress));
                parameter.Add(new KeyValuePair <string, object>("@IsDefault", orderData.ObjBillingAddressInfo.IsDefaultBilling));
                parameter.Add(new KeyValuePair <string, object>("@StoreID", orderData.ObjCommonInfo.StoreID));
                parameter.Add(new KeyValuePair <string, object>("@PortalID", orderData.ObjCommonInfo.PortalID));
                parameter.Add(new KeyValuePair <string, object>("@CultureName", orderData.ObjCommonInfo.CultureName));
                parameter.Add(new KeyValuePair <string, object>("@AddedBy", orderData.ObjCommonInfo.AddedBy));
                SQLHandler sqlH = new SQLHandler();
                int        shippingAddressID = sqlH.ExecuteNonQuery(tran, CommandType.StoredProcedure,
                                                                    "usp_Aspx_ShippingAddress", parameter,
                                                                    "@ShippingAddressID");

                return(shippingAddressID);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        /// <summary>
        /// Connects to database and obtains folder permission for given FolderID.
        /// </summary>
        /// <param name="FolderID">FolderID</param>
        /// <returns>List of FolderPermission class containing FolderID,UserID,PermissionID,PermissionKey,RoleID and UserName.</returns>
        public static List <FolderPermission> GetFolderPermissions(int FolderID)
        {
            List <FolderPermission> lstFolderPer = new List <FolderPermission>();
            string     StoredProcedureName       = "usp_FileManagerGetFolderPermission";
            SQLHandler sagesql = new SQLHandler();
            List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >();

            ParaMeterCollection.Add(new KeyValuePair <string, object>("@FolderID", FolderID));
            SqlDataReader SQLReader = null;

            try
            {
                SQLReader = sagesql.ExecuteAsDataReader(StoredProcedureName, ParaMeterCollection);
                while (SQLReader.Read())
                {
                    FolderPermission obj = new FolderPermission();
                    obj.FolderID      = int.Parse(SQLReader["FolderID"].ToString());
                    obj.UserID        = int.Parse(SQLReader["UserID"].ToString());
                    obj.PermissionID  = int.Parse(SQLReader["PermissionID"].ToString());
                    obj.PermissionKey = SQLReader["PermissionKey"].ToString();
                    obj.RoleID        = new Guid(SQLReader["RoleID"].ToString());
                    obj.UserName      = SQLReader["UserName"].ToString() ?? SQLReader["UserName"].ToString();

                    lstFolderPer.Add(obj);
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                if (SQLReader != null)
                {
                    SQLReader.Close();
                }
            }
            return(lstFolderPer);
        }
Example #47
0
 /// <summary>
 /// Return modules assigne with page for superuser.
 /// </summary>
 /// <param name="controlType">Application control type.</param>
 /// <param name="pageSEOName">Page name.</param>
 ///  <param name="GetUsername">User name.</param>
 /// <param name="cultureCode">Culture code.</param>
 /// <param name="isPreview">"true" for availablity of preview .</param>
 /// <param name="previewCode">Preview code.</param>
 /// <returns>UserModuleInfo list.</returns>
 public List <UserModuleInfo> GetPageModules_Superuser(string controlType, string pageSEOName, string GetUsername, string cultureCode, bool isPreview, string previewCode)
 {
     try
     {
         List <KeyValuePair <string, string> > ParaMeterCollection = new List <KeyValuePair <string, string> >();
         ParaMeterCollection.Add(new KeyValuePair <string, string>("@ControlType", controlType));
         ParaMeterCollection.Add(new KeyValuePair <string, string>("@PageSEOName", pageSEOName));
         ParaMeterCollection.Add(new KeyValuePair <string, string>("@PortalID", GetPortalID.ToString()));
         ParaMeterCollection.Add(new KeyValuePair <string, string>("@UserName", GetUsername));
         ParaMeterCollection.Add(new KeyValuePair <string, string>("@CultureCode", cultureCode));
         ParaMeterCollection.Add(new KeyValuePair <string, string>("@IsPreview", isPreview.ToString()));
         ParaMeterCollection.Add(new KeyValuePair <string, string>("@PreviewCode", previewCode));
         List <UserModuleInfo> lstPageModules = new List <UserModuleInfo>();
         SQLHandler            sagesql        = new SQLHandler();
         lstPageModules = sagesql.ExecuteAsList <UserModuleInfo>("[dbo].[usp_MasterPageGetPageModules_Superuser]", ParaMeterCollection);
         return(lstPageModules);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Example #48
0
        /// <summary>
        /// Connect to database and save settings.
        /// </summary>
        /// <param name="lstSetting">List of SettingInfo class.</param>
        /// <returns></returns>
        public static bool SaveSettings(List <SettingInfo> lstSetting)
        {
            string     sp      = "usp_SaveSettings";
            SQLHandler sagesql = new SQLHandler();

            try
            {
                foreach (SettingInfo obj in lstSetting)
                {
                    List <KeyValuePair <string, object> > ParamCollection = new List <KeyValuePair <string, object> >();
                    ParamCollection.Add(new KeyValuePair <string, object>("@SettingKey", obj.SettingKey));
                    ParamCollection.Add(new KeyValuePair <string, object>("@SettingValue", obj.SettingValue));
                    sagesql.ExecuteNonQuery(sp, ParamCollection);
                }

                return(true);
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #49
0
        /// <summary>
        /// Connects to database and adds portal modules.
        /// </summary>
        /// <param name="PortalID">Portal ID.</param>
        /// <param name="ModuleID">Module ID.</param>
        /// <param name="IsActive">Set true if the portal module is active.</param>
        /// <param name="AddedOn">Portal module added date.</param>
        /// <param name="AddedBy">Portal module added user's name.</param>
        /// <returns>Returns portal's module ID.</returns>
        public int AddPortalModules(int?PortalID, int?ModuleID, bool IsActive, DateTime AddedOn, string AddedBy)
        {
            string     sp      = "[dbo].[sp_PortalModulesAdd]";
            SQLHandler sagesql = new SQLHandler();

            try
            {
                List <KeyValuePair <string, object> > ParamCollInput = new List <KeyValuePair <string, object> >();
                ParamCollInput.Add(new KeyValuePair <string, object>("@PortalID", PortalID));
                ParamCollInput.Add(new KeyValuePair <string, object>("@ModuleID", ModuleID));
                ParamCollInput.Add(new KeyValuePair <string, object>("@IsActive", IsActive));
                ParamCollInput.Add(new KeyValuePair <string, object>("@AddedOn", AddedOn));
                ParamCollInput.Add(new KeyValuePair <string, object>("@AddedBy", AddedBy));

                int pmID = sagesql.ExecuteNonQueryAsGivenType <int>(sp, ParamCollInput, "@PortalModuleID");
                return(pmID);
            }
            catch (Exception)
            {
                throw;
            }
        }
 public void HtmlTextUpdate(string UserModuleID, string Content, string CultureName, bool IsAllowedToComment, bool IsActive, bool IsModified, DateTime UpdatedOn, int PortalID, string UpdatedBy)
 {
     try
     {
         List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >();
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@UserModuleID", UserModuleID));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@Content", Content));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@CultureName", CultureName));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@IsAllowedToComment", IsAllowedToComment));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@IsActive", IsActive));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@IsModified", IsModified));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@UpdatedOn", UpdatedOn));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@PortalID", PortalID));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@UpdatedBy", UpdatedBy));
         SQLHandler Sq = new SQLHandler();
         Sq.ExecuteNonQuery("dbo.sp_HtmlTextUpdate", ParaMeterCollection);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
        //--------------------------get customer class----------------

        public static List <TaxManageRulesInfo> GetTaxRules(int offset, int limit, TaxRuleDataInfo taxRuleDataObj, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
                parameter.Add(new KeyValuePair <string, object>("@offset", offset));
                parameter.Add(new KeyValuePair <string, object>("@limit", limit));
                parameter.Add(new KeyValuePair <string, object>("@RuleName", taxRuleDataObj.TaxManageRuleName));
                parameter.Add(new KeyValuePair <string, object>("@RoleName", taxRuleDataObj.RoleName));
                parameter.Add(new KeyValuePair <string, object>("@ItemClassName", taxRuleDataObj.TaxItemClassName));
                parameter.Add(new KeyValuePair <string, object>("@RateTitle", taxRuleDataObj.TaxRateTitle));
                parameter.Add(new KeyValuePair <string, object>("@SearchPriority", taxRuleDataObj.Priority));
                parameter.Add(new KeyValuePair <string, object>("@SearchDisplayOrder", taxRuleDataObj.DisplayOrder));
                SQLHandler sqlh = new SQLHandler();
                List <TaxManageRulesInfo> lstTaxManage = sqlh.ExecuteAsList <TaxManageRulesInfo>("usp_Aspx_GetTaxManageRules", parameter);
                return(lstTaxManage);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Example #52
0
        /// <summary>
        /// Connect to database and obtain application portal roles.
        /// </summary>
        /// <param name="PortalID">PortalID</param>
        /// <param name="IsAll">1 for all roles.</param>
        /// <param name="UserName">User name.</param>
        /// <returns>List of RoleInfo class.</returns>
        public static List <RoleInfo> GetPortalRoles(int PortalID, int IsAll, string UserName)
        {
            string     sp      = "[dbo].[sp_PortalRoleList]";
            SQLHandler sagesql = new SQLHandler();

            List <KeyValuePair <string, object> > ParamCollInput = new List <KeyValuePair <string, object> >();

            ParamCollInput.Add(new KeyValuePair <string, object>("@PortalID", PortalID));
            ParamCollInput.Add(new KeyValuePair <string, object>("@IsAll", IsAll));
            ParamCollInput.Add(new KeyValuePair <string, object>("@UserName", UserName));

            List <RoleInfo> lstPortalRoles = new List <RoleInfo>();
            SqlDataReader   reader         = null;

            try
            {
                reader = sagesql.ExecuteAsDataReader(sp, ParamCollInput);
                while (reader.Read())
                {
                    RoleInfo obj = new RoleInfo();
                    obj.RoleName = reader["RoleName"].ToString();
                    obj.RoleID   = new Guid(reader["RoleID"].ToString());
                    lstPortalRoles.Add(obj);
                }
                reader.Close();
                return(lstPortalRoles);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }
        }
Example #53
0
        /// <summary>
        /// Connects to database and updates extension
        /// </summary>
        /// <param name="objInfo">ModuleInfo object</param>
        public void UpdateExtension(ModuleInfo objInfo)
        {
            string     sp      = "[dbo].[sp_ExtensionUpdate]";
            SQLHandler sagesql = new SQLHandler();

            try
            {
                List <KeyValuePair <string, object> > ParamCollInput = new List <KeyValuePair <string, object> >();
                ParamCollInput.Add(new KeyValuePair <string, object>("@ModuleID", objInfo.ModuleID));
                ParamCollInput.Add(new KeyValuePair <string, object>("@FolderName", objInfo.FolderName));
                ParamCollInput.Add(new KeyValuePair <string, object>("@BusinessControllerClass", objInfo.BusinessControllerClass));
                ParamCollInput.Add(new KeyValuePair <string, object>("@Dependencies", objInfo.dependencies));
                ParamCollInput.Add(new KeyValuePair <string, object>("@Permissions", objInfo.permissions));

                ParamCollInput.Add(new KeyValuePair <string, object>("@IsPortable", objInfo.IsPortable));
                ParamCollInput.Add(new KeyValuePair <string, object>("@IsSearchable", objInfo.IsSearchable));
                ParamCollInput.Add(new KeyValuePair <string, object>("@IsUpgradable", objInfo.IsUpgradable));
                ParamCollInput.Add(new KeyValuePair <string, object>("@IsPremium", objInfo.isPremium));


                ParamCollInput.Add(new KeyValuePair <string, object>("@PackageName", objInfo.PackageName));
                ParamCollInput.Add(new KeyValuePair <string, object>("@PackageDescription", objInfo.PackageDescription));
                ParamCollInput.Add(new KeyValuePair <string, object>("@Version", objInfo.Version));
                ParamCollInput.Add(new KeyValuePair <string, object>("@License", objInfo.License));
                ParamCollInput.Add(new KeyValuePair <string, object>("@ReleaseNotes", objInfo.ReleaseNotes));

                ParamCollInput.Add(new KeyValuePair <string, object>("@Owner", objInfo.Owner));
                ParamCollInput.Add(new KeyValuePair <string, object>("@Organization", objInfo.Organization));
                ParamCollInput.Add(new KeyValuePair <string, object>("@Url", objInfo.URL));
                ParamCollInput.Add(new KeyValuePair <string, object>("@Email", objInfo.Email));
                ParamCollInput.Add(new KeyValuePair <string, object>("@PortalID", objInfo.PortalID));
                ParamCollInput.Add(new KeyValuePair <string, object>("@UserName", objInfo.Username));
                sagesql.ExecuteNonQuery(sp, ParamCollInput);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #54
0
        /// <summary>
        /// Connects to database and get modules.
        /// </summary>
        /// <param name="TotalCount">Total count.</param>
        /// <returns>ModuleInfo list.</returns>
        public static List <ModuleInfo> GetModules(int TotalCount)
        {
            SQLHandler sageSql = new SQLHandler();

            try
            {
                List <KeyValuePair <string, object> > ParamCollInput = new List <KeyValuePair <string, object> >();
                ParamCollInput.Add(new KeyValuePair <string, object>("@ModulesCount", TotalCount));

                List <ModuleInfo> list = sageSql.ExecuteAsList <ModuleInfo>("usp_LatestModulesList", ParamCollInput);

                //foreach (ModuleWebInfo moduleInfo in list)
                //{
                //    moduleInfo.DownloadUrl = "";
                //}
                return(list);
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #55
0
 public StartUpInfoCollection GetStartUpInformation(string moduleFriendlyName1, string moduleFriendlyName2, StoreAccessDetailsInfo objStoreAccess)
 {
     try
     {
         SQLHandler sqlH = new SQLHandler();
         List <KeyValuePair <string, object> > parameterCollection = new List <KeyValuePair <string, object> >();
         parameterCollection.Add(new KeyValuePair <string, object>("@ModuleFriendlyName1", moduleFriendlyName1));
         parameterCollection.Add(new KeyValuePair <string, object>("@ModuleFriendlyName2", moduleFriendlyName2));
         parameterCollection.Add(new KeyValuePair <string, object>("@IPAddress", objStoreAccess.UserIPAddress));
         parameterCollection.Add(new KeyValuePair <string, object>("@Domain", objStoreAccess.UserDomainURL));
         parameterCollection.Add(new KeyValuePair <string, object>("@CustomerName", objStoreAccess.Username));
         parameterCollection.Add(new KeyValuePair <string, object>("@StoreID", objStoreAccess.StoreID));
         parameterCollection.Add(new KeyValuePair <string, object>("@PortalID", objStoreAccess.PortalID));
         StartUpInfoCollection objStartUp = new StartUpInfoCollection();
         objStartUp = sqlH.ExecuteAsObject <StartUpInfoCollection>("[usp_Aspx_GetStartUpInformation]", parameterCollection);
         return(objStartUp);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
        public static void RewardPointsSaveNewsLetter(RewardPointsNLCommonInfo rewardPointsInfo,
                                                      AspxCommonInfo aspxCommonObj)
        {
            try
            {
                SQLHandler sqlH = new SQLHandler();
                List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();

                parameter.Add(new KeyValuePair <string, object>("@RewardRuleID", rewardPointsInfo.RewardRuleID));
                parameter.Add(new KeyValuePair <string, object>("@StoreID", aspxCommonObj.StoreID));
                parameter.Add(new KeyValuePair <string, object>("@PortalID", aspxCommonObj.PortalID));
                parameter.Add(new KeyValuePair <string, object>("@CultureName", aspxCommonObj.CultureName));
                parameter.Add(new KeyValuePair <string, object>("@CustomerID", aspxCommonObj.CustomerID));
                parameter.Add(new KeyValuePair <string, object>("@UserName", aspxCommonObj.UserName));
                parameter.Add(new KeyValuePair <string, object>("@Email", rewardPointsInfo.Email));
                sqlH.ExecuteNonQuery("usp_Aspx_RewardPointsSaveNewsLetter", parameter);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #57
0
 public List <AttributeFormInfo> GetItemDetailsInfoByItemSKU(string itemSKU, int attributeSetID, int itemTypeID, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <AttributeFormInfo> itemAttributes;
         SQLHandler sqlH = new SQLHandler();
         List <KeyValuePair <string, object> > parameterCollection = new List <KeyValuePair <string, object> >();
         parameterCollection.Add(new KeyValuePair <string, object>("@itemSKU", itemSKU));
         parameterCollection.Add(new KeyValuePair <string, object>("@AttributeSetID", attributeSetID));
         parameterCollection.Add(new KeyValuePair <string, object>("@ItemTypeID", itemTypeID));
         parameterCollection.Add(new KeyValuePair <string, object>("@StoreID", aspxCommonObj.StoreID));
         parameterCollection.Add(new KeyValuePair <string, object>("@PortalID", aspxCommonObj.PortalID));
         parameterCollection.Add(new KeyValuePair <string, object>("@UserName", aspxCommonObj.UserName));
         parameterCollection.Add(new KeyValuePair <string, object>("@CultureName", aspxCommonObj.CultureName));
         itemAttributes = sqlH.ExecuteAsList <AttributeFormInfo>("dbo.usp_Aspx_GetItemDetailsByItemSKU", parameterCollection);
         return(itemAttributes);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public List <AttributeFormInfo> GetItemAttributesValuesByItemID(int itemID, int attributeSetID, int itemTypeID, int storeID, int portalID, string userName, string culture)
 {
     try
     {
         List <AttributeFormInfo> itemAttributes;
         SQLHandler sqlH = new SQLHandler();
         List <KeyValuePair <string, object> > parameterCollection = new List <KeyValuePair <string, object> >();
         parameterCollection.Add(new KeyValuePair <string, object>("@ItemID", itemID));
         parameterCollection.Add(new KeyValuePair <string, object>("@AttributeSetID", attributeSetID));
         parameterCollection.Add(new KeyValuePair <string, object>("@ItemTypeID", itemTypeID));
         parameterCollection.Add(new KeyValuePair <string, object>("@StoreID", storeID));
         parameterCollection.Add(new KeyValuePair <string, object>("@PortalID", portalID));
         parameterCollection.Add(new KeyValuePair <string, object>("@Username", userName));
         parameterCollection.Add(new KeyValuePair <string, object>("@CultureName", culture));
         itemAttributes = sqlH.ExecuteAsList <AttributeFormInfo>("dbo.usp_Aspx_GetItemFormAttributesValuesByItemID", parameterCollection);
         return(itemAttributes);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #59
0
        public int UpdateComponentValue(string componentName, string componentValue, int userModuleID, decimal version, long UniversalComponentID, string type)
        {
            int result = 0;

            try
            {
                List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >();
                param.Add(new KeyValuePair <string, object>("@ComponentName", componentName));
                param.Add(new KeyValuePair <string, object>("@ComponentValue", componentValue));
                param.Add(new KeyValuePair <string, object>("@UserModuleID", userModuleID));
                param.Add(new KeyValuePair <string, object>("@Version", version));
                param.Add(new KeyValuePair <string, object>("@UniversalComponentID", UniversalComponentID));
                param.Add(new KeyValuePair <string, object>("@Type", type));
                SQLHandler sagesql = new SQLHandler();
                result = sagesql.ExecuteNonQuery("[dbo].[usp_WebBuilder_ComponentInsert]", param, "@output");
            }
            catch
            {
                throw;
            }
            return(result);
        }
Example #60
0
 /// <summary>
 /// Connects to database and updates a startup event and returns list of startup user startup event details.
 /// </summary>
 /// <param name="PortalStartUpID">Portal startup ID</param>
 /// <param name="PortalID">Portal ID.</param>
 /// <param name="ControlUrl">User control's URL.</param>
 /// <param name="EventLocation">User startup event's location.</param>
 /// <param name="IsAdmin">Set true if user startup event is of admin.</param>
 /// <param name="IsControlUrl">Set true if the URL is of user control.</param>
 /// <param name="IsActive">Set true if the startup event is active.</param>
 /// <param name="Username">User's name.</param>
 /// <returns>List of startup events.</returns>
 public List <SystemEventStartUpInfo> UpdateSystemEventStartUp(int PortalStartUpID, int PortalID, string ControlUrl, string EventLocation, bool IsAdmin, bool IsControlUrl, bool IsActive, string Username)
 {
     try
     {
         string     sp   = "[dbo].[usp_UpdateSystemEventStartUp]";
         SQLHandler SQLH = new SQLHandler();
         List <KeyValuePair <string, object> > ParamCollInput = new List <KeyValuePair <string, object> >();
         ParamCollInput.Add(new KeyValuePair <string, object>("@PortalStartUpID", PortalStartUpID));
         ParamCollInput.Add(new KeyValuePair <string, object>("@PortalID", PortalID));
         ParamCollInput.Add(new KeyValuePair <string, object>("@ControlUrl", ControlUrl));
         ParamCollInput.Add(new KeyValuePair <string, object>("@EventLocation", EventLocation));
         ParamCollInput.Add(new KeyValuePair <string, object>("@IsAdmin", IsAdmin));
         ParamCollInput.Add(new KeyValuePair <string, object>("@IsControlUrl", IsControlUrl));
         ParamCollInput.Add(new KeyValuePair <string, object>("@IsActive", IsActive));
         ParamCollInput.Add(new KeyValuePair <string, object>("@UserName", Username));
         return(SQLH.ExecuteAsList <SystemEventStartUpInfo>(sp, ParamCollInput));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }