Ejemplo n.º 1
0
        public static void UpdateUserModulePermission(List <ModulePermissionInfo> lstPermission, OracleTransaction tran, int UserModuleID, int PortalID, string AddedBy, int ModuleDefID)
        {
            try
            {
                //SQLHandler sqlH = new SQLHandler();
                OracleHandler sqlH = new OracleHandler();
                List <KeyValuePair <string, object> > ParamColl = new List <KeyValuePair <string, object> >
                {
                    new KeyValuePair <string, object>("UserModuleID",
                                                      UserModuleID),
                    new KeyValuePair <string, object>(
                        "PortalID", PortalID)
                };
                sqlH.ExecuteNonQuery(tran, CommandType.StoredProcedure, "usp_UserModulePermissionDelete",
                                     ParamColl);


                foreach (ModulePermissionInfo objPerm in lstPermission)
                {
                    if (objPerm == null)
                    {
                        continue;
                    }
                    List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >
                    {
                        new KeyValuePair <string, object>(
                            "ModuleDefID", ModuleDefID),
                        new KeyValuePair <string, object>(
                            "UserModuleID", UserModuleID),
                        new KeyValuePair <string, object>(
                            "AllowAccess", objPerm.AllowAccess),
                        new KeyValuePair <string, object>(
                            "RoleID", objPerm.RoleID),
                        new KeyValuePair <string, object>(
                            "UserName", objPerm.UserName),
                        new KeyValuePair <string, object>(
                            "IsActive", true),
                        new KeyValuePair <string, object>(
                            "AddedOn", DateTime.Now),
                        new KeyValuePair <string, object>(
                            "PortalID", PortalID),
                        new KeyValuePair <string, object>(
                            "AddedBy", AddedBy),
                        new KeyValuePair <string, object>(
                            "PermissionID", objPerm.PermissionID)
                    };

                    sqlH.ExecuteNonQuery(tran, CommandType.StoredProcedure, "usp_UserModulesPermissionAdd",
                                         ParaMeterCollection);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void SaveItemImage(int itemId, List <ItemsValues> imageObj, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                OracleHandler sageSql   = new OracleHandler();
                var           baseImage = GetValuesByAttirbuteId(imageObj, 12);
                if (baseImage != null && baseImage != "")
                {
                    var imagePath = baseImage;
                    List <KeyValuePair <string, object> > parameterCollection = new List <KeyValuePair <string, object> >();
                    parameterCollection.Add(new KeyValuePair <string, object>("ItemID", itemId));
                    parameterCollection.Add(new KeyValuePair <string, object>("PathList", imagePath));
                    parameterCollection.Add(new KeyValuePair <string, object>("IsActive", true));
                    parameterCollection.Add(new KeyValuePair <string, object>("ImageType", 1));
                    parameterCollection.Add(new KeyValuePair <string, object>("AlternateText", GetValuesByAttirbuteId(imageObj, 1)));
                    parameterCollection.Add(new KeyValuePair <string, object>("DisplayOrder", "1"));
                    parameterCollection.Add(new KeyValuePair <string, object>("CultureName", aspxCommonObj.CultureName));
                    sageSql.ExecuteNonQuery("usp_Aspx_InsertUpdateImageFromExcel", parameterCollection);
                }

                //var smallImage = GetValuesByAttirbuteId(imageObj, 21);
                //if (smallImage != null && smallImage != "")
                //{
                //    var imagePath1 = "Modules/AspxCommerce/AspxItemsManagement/uploads + smallImage;
                //    List<KeyValuePair<string, object>> parameterCollection1 = new List<KeyValuePair<string, object>>();
                //    parameterCollection1.Add(new KeyValuePair<string, object>("@ItemID", itemId));
                //    parameterCollection1.Add(new KeyValuePair<string, object>("@PathList", imagePath1));
                //    parameterCollection1.Add(new KeyValuePair<string, object>("@IsActive", true));
                //    parameterCollection1.Add(new KeyValuePair<string, object>("@ImageType", 2));
                //    parameterCollection1.Add(new KeyValuePair<string, object>("@AlternateText", ""));
                //    parameterCollection1.Add(new KeyValuePair<string, object>("@DisplayOrder", "3"));
                //    parameterCollection1.Add(new KeyValuePair<string, object>("@CultureName", aspxCommonObj.CultureName));
                //    sageSql.ExecuteNonQuery("[dbo].[usp_Aspx_InsertUpdateImageFromExcel]", parameterCollection1);
                //}

                var thumbImage = GetValuesByAttirbuteId(imageObj, 22);
                if (thumbImage != null && thumbImage != "")
                {
                    var imagePath2 = thumbImage;
                    List <KeyValuePair <string, object> > parameterCollection2 = new List <KeyValuePair <string, object> >();
                    parameterCollection2.Add(new KeyValuePair <string, object>("ItemID", itemId));
                    parameterCollection2.Add(new KeyValuePair <string, object>("PathList", imagePath2));
                    parameterCollection2.Add(new KeyValuePair <string, object>("IsActive", true));
                    parameterCollection2.Add(new KeyValuePair <string, object>("ImageType", 3));
                    parameterCollection2.Add(new KeyValuePair <string, object>("AlternateText", GetValuesByAttirbuteId(imageObj, 1)));
                    parameterCollection2.Add(new KeyValuePair <string, object>("DisplayOrder", "2"));
                    parameterCollection2.Add(new KeyValuePair <string, object>("CultureName", aspxCommonObj.CultureName));
                    sageSql.ExecuteNonQuery("usp_Aspx_InsertUpdateImageFromExcel", parameterCollection2);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static void AddDashBoardSetting(List <DashBoardSettingInfo> lstDashBoardSetting)
        {
            foreach (DashBoardSettingInfo obj in lstDashBoardSetting)
            {
                List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >();
                ParaMeterCollection.Add(new KeyValuePair <string, object>("UserModuleID", obj.UserModuleID));
                ParaMeterCollection.Add(new KeyValuePair <string, object>("SettingKey", obj.SettingKey));
                ParaMeterCollection.Add(new KeyValuePair <string, object>("SettingValue", obj.SettingValue));
                ParaMeterCollection.Add(new KeyValuePair <string, object>("IsActive", obj.IsActive));
                ParaMeterCollection.Add(new KeyValuePair <string, object>("PortalID", obj.PortalID));
                ParaMeterCollection.Add(new KeyValuePair <string, object>("UpdatedBy", obj.AddedBy));
                ParaMeterCollection.Add(new KeyValuePair <string, object>("AddedBy", obj.AddedBy));

                try
                {
                    OracleHandler Objsql = new OracleHandler();
                    //SQLHandler Objsql = new SQLHandler();
                    Objsql.ExecuteNonQuery("usp_SiteAnalyticsSettingAddUpdate", ParaMeterCollection);
                }
                catch (Exception)
                {
                    throw;
                }
            }
        }
Ejemplo n.º 4
0
 public static void ReturnShippingAddressSaveUpdate(AddressBasicInfo addressObj, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetFParamNoU(aspxCommonObj);
         parameterCollection.Add(new KeyValuePair <string, object>("OrderID", addressObj.OrderID));
         parameterCollection.Add(new KeyValuePair <string, object>("ItemID", addressObj.ItemID));
         parameterCollection.Add(new KeyValuePair <string, object>("CostVariantValueIDs", addressObj.CostVariantIDs));
         parameterCollection.Add(new KeyValuePair <string, object>("AddressID", addressObj.AddressID));
         parameterCollection.Add(new KeyValuePair <string, object>("FirstName", addressObj.FirstName));
         parameterCollection.Add(new KeyValuePair <string, object>("LastName", addressObj.LastName));
         parameterCollection.Add(new KeyValuePair <string, object>("Company", addressObj.Company));
         parameterCollection.Add(new KeyValuePair <string, object>("Address1", addressObj.Address1));
         parameterCollection.Add(new KeyValuePair <string, object>("Address2", addressObj.Address2));
         parameterCollection.Add(new KeyValuePair <string, object>("City", addressObj.City));
         parameterCollection.Add(new KeyValuePair <string, object>("State", addressObj.State));
         parameterCollection.Add(new KeyValuePair <string, object>("Country", addressObj.Country));
         parameterCollection.Add(new KeyValuePair <string, object>("Zip", addressObj.Zip));
         parameterCollection.Add(new KeyValuePair <string, object>("Email", addressObj.Email));
         parameterCollection.Add(new KeyValuePair <string, object>("Phone", addressObj.Phone));
         parameterCollection.Add(new KeyValuePair <string, object>("Mobile", addressObj.Mobile));
         parameterCollection.Add(new KeyValuePair <string, object>("AddedBy", aspxCommonObj.UserName));
         OracleHandler sqlH = new OracleHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_ReturnShippingAddressSaveUpdate", parameterCollection);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// To Save Attribute Set
        /// </summary>
        /// <returns></returns>
        public static int SaveUpdateAttributeSet(AttributeSetInfo attributeSetInfoToInsert, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameterCollection = new List <KeyValuePair <string, object> >();
                parameterCollection.Add(new KeyValuePair <string, object>("AttributeSetID", attributeSetInfoToInsert.AttributeSetID));
                parameterCollection.Add(new KeyValuePair <string, object>("AttributeSetBaseID", attributeSetInfoToInsert.AttributeSetBaseID));
                parameterCollection.Add(new KeyValuePair <string, object>("AttributeSetName", attributeSetInfoToInsert.AttributeSetName));
                parameterCollection.Add(new KeyValuePair <string, object>("IsActive", attributeSetInfoToInsert.IsActive));
                parameterCollection.Add(new KeyValuePair <string, object>("IsModified", attributeSetInfoToInsert.IsModified));

                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", attributeSetInfoToInsert.AddedBy));
                parameterCollection.Add(new KeyValuePair <string, object>("UpdateFlag", attributeSetInfoToInsert.Flag));
                parameterCollection.Add(new KeyValuePair <string, object>("SaveString", attributeSetInfoToInsert.SaveString));
                parameterCollection.Add(new KeyValuePair <string, object>("CultureName", aspxCommonObj.CultureName));
                OracleHandler sqlH = new OracleHandler();
                return(sqlH.ExecuteNonQuery("dbo.usp_Aspx_AttributeSetAddUpdate", parameterCollection, "AttributeSetIDOut"));
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Ejemplo n.º 6
0
        public static void UpdatePageModule(List <PageModuleInfo> lstPageModules)
        {
            string StoredProcedureName = "usp_PageModule_Update";

            foreach (PageModuleInfo pm in lstPageModules)
            {
                List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >
                {
                    new KeyValuePair <string, object>(
                        "UserModuleID", pm.UserModuleID),
                    new KeyValuePair <string, object>(
                        "PaneName", pm.PaneName),
                    new KeyValuePair <string, object>(
                        "ModuleOrder", pm.ModuleOrder)
                };

                try
                {
                    //SQLHandler sagesql = new SQLHandler();
                    OracleHandler sagesql = new OracleHandler();
                    sagesql.ExecuteNonQuery(StoredProcedureName, ParaMeterCollection);
                }
                catch (Exception e)
                {
                    throw e;
                }
            }
        }
Ejemplo n.º 7
0
 public static void UpdateUserModuleInheritedPermission(int PageID, OracleTransaction tran, int UserModuleID, int PortalID, string AddedBy, int ModuleDefID)
 {
     try
     {
         List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >
         {
             new KeyValuePair <string, object>(
                 "ModuleDefID", ModuleDefID),
             new KeyValuePair <string, object>(
                 "UserModuleID", UserModuleID),
             new KeyValuePair <string, object>(
                 "AllowAccess", true),
             new KeyValuePair <string, object>(
                 "IsActive", true),
             new KeyValuePair <string, object>(
                 "AddedOn", DateTime.Now),
             new KeyValuePair <string, object>(
                 "PortalID", PortalID),
             new KeyValuePair <string, object>(
                 "AddedBy", AddedBy),
             new KeyValuePair <string, object>(
                 "PageID", PageID)
         };
         //SQLHandler sqlH = new SQLHandler();
         OracleHandler sqlH = new OracleHandler();
         sqlH.ExecuteNonQuery(tran, CommandType.StoredProcedure, "usp_UserModulesInheritedPermissionAdd",
                              ParaMeterCollection);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public static void CartConditionDetailAdd(List <CartConditionDetail> lstCartConditionDetail, int?ruleConditionID, int cartPriceRuleID, OracleTransaction tran, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         foreach (CartConditionDetail objCartConditionDetail in lstCartConditionDetail)
         {
             if (objCartConditionDetail != null)
             {
                 List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamPUC(aspxCommonObj);
                 parameter.Add(new KeyValuePair <string, object>("RuleConditionID", ruleConditionID));
                 parameter.Add(new KeyValuePair <string, object>("CartPriceRuleID", cartPriceRuleID));
                 parameter.Add(new KeyValuePair <string, object>("AttributeID",
                                                                 objCartConditionDetail.AttributeID));
                 parameter.Add(new KeyValuePair <string, object>("RuleOperatorID",
                                                                 objCartConditionDetail.RuleOperatorID));
                 parameter.Add(new KeyValuePair <string, object>("Value", objCartConditionDetail.Value));
                 parameter.Add(new KeyValuePair <string, object>("Priority", objCartConditionDetail.Priority));
                 parameter.Add(new KeyValuePair <string, object>("IsActive", true));
                 OracleHandler sqlH = new OracleHandler();
                 sqlH.ExecuteNonQuery(tran, CommandType.StoredProcedure,
                                      "usp_Aspx_CartConditionDetailAdd", parameter);
             }
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
        public static void AddHtmlContent(MenuManagerInfo MenuItems)
        {
            string sp = "usp_MenuMgrAddHtmlContent";
            OracleHandler sagesql = new OracleHandler();
            try
            {
                List<KeyValuePair<string, object>> ParamCollInput = new List<KeyValuePair<string, object>>();
                ParamCollInput.Add(new KeyValuePair<string, object>("MenuID", MenuItems.MenuID));
                ParamCollInput.Add(new KeyValuePair<string, object>("MenuItemID", MenuItems.MenuItemID));
                ParamCollInput.Add(new KeyValuePair<string, object>("LinkType", MenuItems.LinkType));
                ParamCollInput.Add(new KeyValuePair<string, object>("Title", MenuItems.Title));
                ParamCollInput.Add(new KeyValuePair<string, object>("HtmlContent", MenuItems.HtmlContent));
                ParamCollInput.Add(new KeyValuePair<string, object>("ImageIcon", MenuItems.ImageIcon));
                ParamCollInput.Add(new KeyValuePair<string, object>("Caption", MenuItems.Caption));
                ParamCollInput.Add(new KeyValuePair<string, object>("ParentID", MenuItems.ParentID));
                ParamCollInput.Add(new KeyValuePair<string, object>("MenuLevel", MenuItems.MenuLevel));
                ParamCollInput.Add(new KeyValuePair<string, object>("IsVisible", MenuItems.IsVisible));
                ParamCollInput.Add(new KeyValuePair<string, object>("Mode", MenuItems.Mode));
                ParamCollInput.Add(new KeyValuePair<string, object>("IsActive", MenuItems.IsActive));

                sagesql.ExecuteNonQuery(sp, ParamCollInput);
            }
            catch (Exception)
            {

                throw;
            }

        }
        public int AddBillingAddress(OrderDetailsCollection orderData, OracleTransaction tran, int addressID)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();

                parameter.Add(new KeyValuePair <string, object>("AddressID", addressID));
                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));

                OracleHandler sqlH = new OracleHandler();

                int billingAddressID = sqlH.ExecuteNonQuery(tran, CommandType.StoredProcedure,
                                                            "usp_Aspx_UserBillingAddress", parameter,
                                                            "UserBillingAddressID");

                return(addressID);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        //single
        public void AddOrderItems(OrderDetailsCollection orderData, OracleTransaction tran, int orderID, int shippingAddressID)
        {
            try
            {
                foreach (OrderItemInfo objItems in orderData.LstOrderItemsInfo)
                {
                    List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();

                    parameter.Add(new KeyValuePair <string, object>("OrderID", orderID));
                    parameter.Add(new KeyValuePair <string, object>("UserShippingAddressID", shippingAddressID));
                    parameter.Add(new KeyValuePair <string, object>("ShippingMethodID", objItems.ShippingMethodID));
                    parameter.Add(new KeyValuePair <string, object>("ItemID", objItems.ItemID));
                    parameter.Add(new KeyValuePair <string, object>("Price", objItems.Price));
                    parameter.Add(new KeyValuePair <string, object>("Quantity", objItems.Quantity));
                    parameter.Add(new KeyValuePair <string, object>("Weight", objItems.Weight));
                    parameter.Add(new KeyValuePair <string, object>("Remarks", objItems.Remarks));
                    parameter.Add(new KeyValuePair <string, object>("ShippingRate", objItems.ShippingRate));

                    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));
                    parameter.Add(new KeyValuePair <string, object>("CostVariants", objItems.Variants));
                    parameter.Add(new KeyValuePair <string, object>("RewardedPoints", objItems.RewardedPoints));

                    OracleHandler sqlH = new OracleHandler();
                    sqlH.ExecuteNonQuery(tran, CommandType.StoredProcedure, "usp_Aspx_OrderItem", parameter);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public void UpdateItemQuantity(OrderDetailsCollection orderData)
        {
            try
            {
                if (orderData.ObjOrderDetails.CouponCode != null && System.Web.HttpContext.Current.Session["CouponApplied"] != null)
                {
                    ReduceCouponUsed(orderData.ObjOrderDetails.CouponCode.Trim(), orderData.ObjCommonInfo.StoreID, orderData.ObjCommonInfo.PortalID, orderData.ObjCommonInfo.AddedBy, orderData.ObjOrderDetails.OrderID);
                }

                foreach (OrderItemInfo objItems in orderData.LstOrderItemsInfo)
                {
                    if (objItems.IsDownloadable != true)
                    {
                        List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();
                        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>("ItemID", objItems.ItemID));
                        parameter.Add(new KeyValuePair <string, object>("Quantity", objItems.Quantity));
                        parameter.Add(new KeyValuePair <string, object>("OrderID", orderData.ObjOrderDetails.OrderID));
                        parameter.Add(new KeyValuePair <string, object>("CostVariantsIDs", objItems.Variants));
                        OracleHandler sqlH = new OracleHandler();
                        sqlH.ExecuteNonQuery("usp_Aspx_UpdateItemQuantitybyOrder", parameter);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static void UpdateItemQuantity(OrderDetailsCollection orderData)
        {
            try
            {
                if (orderData.Coupons.Count > 0)
                {
                    foreach (var coupon in orderData.Coupons)
                    {
                        ReduceCouponUsed(coupon, orderData.ObjCommonInfo.StoreID, orderData.ObjCommonInfo.PortalID, orderData.ObjCommonInfo.AddedBy, orderData.ObjOrderDetails.OrderID);
                    }
                }

                foreach (OrderItemInfo objItems in orderData.LstOrderItemsInfo)
                {
                    if (objItems.IsDownloadable != true)
                    {
                        List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();
                        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>("ItemID", objItems.ItemID));
                        parameter.Add(new KeyValuePair <string, object>("Quantity", objItems.Quantity));
                        parameter.Add(new KeyValuePair <string, object>("OrderID", orderData.ObjOrderDetails.OrderID));
                        parameter.Add(new KeyValuePair <string, object>("CostVariantsIDs", objItems.Variants));
                        OracleHandler sqlH = new OracleHandler();
                        sqlH.ExecuteNonQuery("usp_Aspx_UpdateItemQuantitybyO", parameter);
                        //usp_Aspx_UpdateItemQuantitybyOrder
                    }
                }
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Ejemplo n.º 14
0
 public static void RewardPointsSaveUpdateNewRule(RewardPointsCommonInfo rewardPointsCommonObj,
                                                  AspxCommonInfo aspxCommonObj)
 {
     try
     {
         OracleHandler sqlH = new OracleHandler();
         List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();
         parameter.Add(new KeyValuePair <string, object>("RewardPointSettingsID",
                                                         rewardPointsCommonObj.RewardPointSettingsID));
         parameter.Add(new KeyValuePair <string, object>("RewardRuleName", rewardPointsCommonObj.RewardRuleName));
         parameter.Add(new KeyValuePair <string, object>("RewardRuleID", rewardPointsCommonObj.RewardRuleID));
         parameter.Add(new KeyValuePair <string, object>("RewardRuleType", rewardPointsCommonObj.RewardRuleType));
         parameter.Add(new KeyValuePair <string, object>("RewardPoints", rewardPointsCommonObj.RewardPoints));
         parameter.Add(new KeyValuePair <string, object>("PurchaseAmount", rewardPointsCommonObj.PurchaseAmount));
         parameter.Add(new KeyValuePair <string, object>("IsActive", rewardPointsCommonObj.IsActive));
         parameter.Add(new KeyValuePair <string, object>("StoreID", aspxCommonObj.StoreID));
         parameter.Add(new KeyValuePair <string, object>("PortalID", aspxCommonObj.PortalID));
         parameter.Add(new KeyValuePair <string, object>("CulturName", aspxCommonObj.CultureName));
         parameter.Add(new KeyValuePair <string, object>("UserName", aspxCommonObj.UserName));
         sqlH.ExecuteNonQuery("usp_Aspx_RewardPointsSaveUpdateNewRule", parameter);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Ejemplo n.º 15
0
 public static void RewardPointsSaveGeneralSettings(GeneralSettingsCommonInfo generalSettingobj,
                                                    AspxCommonInfo aspxCommonObj)
 {
     try
     {
         OracleHandler sqlH = new OracleHandler();
         List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();
         parameter.Add(new KeyValuePair <string, object>("RewardPoints", generalSettingobj.RewardPoints));
         parameter.Add(new KeyValuePair <string, object>("RewardAmount", generalSettingobj.RewardExchangeRate));
         parameter.Add(new KeyValuePair <string, object>("AddOrderStatusID", generalSettingobj.AddOrderStatusID));
         parameter.Add(new KeyValuePair <string, object>("SubOrderStatusID", generalSettingobj.SubOrderStatusID));
         parameter.Add(new KeyValuePair <string, object>("RewardPointsExpiresInDays",
                                                         generalSettingobj.RewardPointsExpiresInDays));
         parameter.Add(new KeyValuePair <string, object>("MinRedeemBalance", generalSettingobj.MinRedeemBalance));
         parameter.Add(new KeyValuePair <string, object>("BalanceCapped", generalSettingobj.BalanceCapped));
         parameter.Add(new KeyValuePair <string, object>("IsActive", generalSettingobj.IsActive));
         parameter.Add(new KeyValuePair <string, object>("StoreID", aspxCommonObj.StoreID));
         parameter.Add(new KeyValuePair <string, object>("PortalID", aspxCommonObj.PortalID));
         parameter.Add(new KeyValuePair <string, object>("CulturName", aspxCommonObj.CultureName));
         parameter.Add(new KeyValuePair <string, object>("UserName", aspxCommonObj.UserName));
         sqlH.ExecuteNonQuery("usp_Aspx_RewardPointsSaveGeneralSettings", parameter);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
        public void AddUpdateCoupons(CouponSaveObj couponSaveObj, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();
                parameter.Add(new KeyValuePair <string, object>("CouponID", couponSaveObj.CouponID));
                parameter.Add(new KeyValuePair <string, object>("CouponTypeID", couponSaveObj.CouponTypeID));
                parameter.Add(new KeyValuePair <string, object>("CouponCode", couponSaveObj.CouponCode));
                parameter.Add(new KeyValuePair <string, object>("CouponAmount", couponSaveObj.CouponAmount));
                parameter.Add(new KeyValuePair <string, object>("IsPercentage", couponSaveObj.IsPercentage));
                parameter.Add(new KeyValuePair <string, object>("ValidateFrom", couponSaveObj.ValidateFrom));
                parameter.Add(new KeyValuePair <string, object>("ValidateTo", couponSaveObj.ValidateTo));
                parameter.Add(new KeyValuePair <string, object>("IsActive", couponSaveObj.IsActive));
                parameter.Add(new KeyValuePair <string, object>("SettingIDs", couponSaveObj.SettingIDs));
                parameter.Add(new KeyValuePair <string, object>("SettingValues", couponSaveObj.SettingValues));
                parameter.Add(new KeyValuePair <string, object>("PortalUser_UserName", couponSaveObj.PortalUser_UserName));

                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>("UserName", aspxCommonObj.UserName));
                OracleHandler sqlH = new OracleHandler();
                sqlH.ExecuteNonQuery("usp_Aspx_AddUpdateCoupons", parameter);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static void SubselectionRuleConditionAdd(List <ProductSubSelectionRuleCondition> lstPSRuleCondition, int cartPriceRuleID, int ruleConditionID, OracleTransaction tran, AspxCommonInfo aspxCommonObj)
        {
            List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();

            parameter.Add(new KeyValuePair <string, object>("RuleConditionID", ruleConditionID));
            parameter.Add(new KeyValuePair <string, object>("IsAll", lstPSRuleCondition[0].IsAll));
            parameter.Add(new KeyValuePair <string, object>("IsQuantity", lstPSRuleCondition[0].IsQuantity));
            parameter.Add(new KeyValuePair <string, object>("Value", lstPSRuleCondition[0].Value));
            parameter.Add(new KeyValuePair <string, object>("RuleOperatorID", lstPSRuleCondition[0].RuleOperatorID));
            parameter.Add(new KeyValuePair <string, object>("PortalID", aspxCommonObj.PortalID));

            OracleHandler sqlH = new OracleHandler();

            try
            {
                sqlH.ExecuteNonQuery(tran, CommandType.StoredProcedure, "usp_Aspx_ProductSubSelectionRuleConditionAdd", parameter);
                if (lstPSRuleCondition[0].LstCartConditionDetails != null && lstPSRuleCondition[0].LstCartConditionDetails.Count > 0)
                {
                    CartConditionDetailAdd(lstPSRuleCondition[0].LstCartConditionDetails,
                                           ruleConditionID, cartPriceRuleID, tran, aspxCommonObj);
                }
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        public static void AddSetting(List<MenuManagerInfo> objInfo)
        {
            foreach (MenuManagerInfo obj in objInfo)
            {
                List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
                ParaMeterCollection.Add(new KeyValuePair<string, object>("MenuID", obj.MenuID));
                ParaMeterCollection.Add(new KeyValuePair<string, object>("SettingKey", obj.SettingKey));
                ParaMeterCollection.Add(new KeyValuePair<string, object>("SettingValue", obj.SettingValue));
                ParaMeterCollection.Add(new KeyValuePair<string, object>("PortalID", obj.PortalID));
                ParaMeterCollection.Add(new KeyValuePair<string, object>("UpdatedBy", obj.AddedBy));
                ParaMeterCollection.Add(new KeyValuePair<string, object>("AddedBy", obj.AddedBy));

                try
                {
                    OracleHandler sagesql = new OracleHandler();
                    sagesql.ExecuteNonQuery("usp_MenuMgrAddUpdSetting", ParaMeterCollection);

                }
                catch (Exception)
                {

                    throw;
                }
            }

        }
        public static int CartPriceRuleAdd(CartPriceRule cartPriceRule, OracleTransaction 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
            {
                OracleHandler sqlH = new OracleHandler();

                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;
            }
        }
Ejemplo n.º 20
0
        public static void IssueGiftCard(string giftCardIds, int?orderID, AspxCommonInfo aspxCommonObj)
        {
            var ids = giftCardIds.Split('N');

            foreach (var id in ids)
            {
                try
                {
                    int giftCardId = int.Parse(id);
                    List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj);
                    parameter.Add(new KeyValuePair <string, object>("@GiftCardId", giftCardId));
                    parameter.Add(new KeyValuePair <string, object>("@GiftCardCode", GetGiftCardKey()));
                    parameter.Add(new KeyValuePair <string, object>("@IsActive", true));
                    parameter.Add(new KeyValuePair <string, object>("@OrderID", orderID));
                    parameter.Add(new KeyValuePair <string, object>("@GiftCardPinCode", GetGiftPinCode()));
                    parameter.Add(new KeyValuePair <string, object>("@AddedBy", aspxCommonObj.UserName));
                    OracleHandler sqlH = new OracleHandler();
                    sqlH.ExecuteNonQuery("usp_Aspx_IssueGiftCard ", parameter);
                    int typeId = GetGiftCardType(aspxCommonObj.StoreID, aspxCommonObj.PortalID, giftCardId);
                    if (typeId == 1)
                    {
                        NotifyUser(giftCardId, aspxCommonObj);
                    }
                }
                catch (Exception e)
                {
                    throw e;
                }
            }
        }
Ejemplo n.º 21
0
        public static void DeleteUserModule(int UserModuleID, int PortalID, string DeletedBy)
        {
            List <UserModuleInfo> lstUserModules = new List <UserModuleInfo>();
            string StoredProcedureName           = "usp_UserModulesDelete";
            List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >
            {
                new KeyValuePair <string, object>(
                    "UserModuleID", UserModuleID),
                new KeyValuePair <string, object>(
                    "PortalID", PortalID),
                new KeyValuePair <string, object>(
                    "DeletedBy", DeletedBy)
            };

            try
            {
                //SQLHandler sagesql = new SQLHandler();
                OracleHandler sagesql = new OracleHandler();
                sagesql.ExecuteNonQuery(StoredProcedureName, ParaMeterCollection);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Ejemplo n.º 22
0
 public static void UpdateGiftCardUsage(List <GiftCardUsage> gDetail, int storeId, int portalId, int orderId, string userName, string cultureName)
 {
     foreach (var giftCardUsage in gDetail)
     {
         try
         {
             List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();
             parameter.Add(new KeyValuePair <string, object>("@GiftCardId", giftCardUsage.GiftCardId));
             parameter.Add(new KeyValuePair <string, object>("@UsedAmount", giftCardUsage.ReducedAmount));
             parameter.Add(new KeyValuePair <string, object>("@OrderId", orderId));
             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));
             parameter.Add(new KeyValuePair <string, object>("@IsActive",
                                                             giftCardUsage.ReducedAmount != giftCardUsage.Balance));
             parameter.Add(new KeyValuePair <string, object>("@Balance", giftCardUsage.Balance));
             parameter.Add(new KeyValuePair <string, object>("@Amount", giftCardUsage.Price));
             OracleHandler sqlH = new OracleHandler();
             sqlH.ExecuteNonQuery("usp_aspx_UpdateUsageofGiftCard", parameter);
         }
         catch (Exception e)
         {
             throw e;
         }
     }
 }
Ejemplo n.º 23
0
        public static void UpdateGiftCardUsage(string detail, int storeId, int portalId, int orderId, string userName, string cultureName)
        {
            string[] glist = detail.Split('N');

            foreach (var giftCard in glist)
            {
                string[] vls          = giftCard.Split('-');
                int      giftCardId   = int.Parse(vls[0]);     //giftcard id
                decimal  reduceAmount = decimal.Parse(vls[1]); //reduce amount
                decimal  balance      = decimal.Parse(vls[2]); //giftcard balance now
                decimal  price        = decimal.Parse(vls[3]); //giftcard old bal

                try
                {
                    List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();
                    parameter.Add(new KeyValuePair <string, object>("@GiftCardId", giftCardId));
                    parameter.Add(new KeyValuePair <string, object>("@UsedAmount", reduceAmount));
                    parameter.Add(new KeyValuePair <string, object>("@OrderId", orderId));
                    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));
                    parameter.Add(new KeyValuePair <string, object>("@IsActive",
                                                                    reduceAmount != balance));
                    parameter.Add(new KeyValuePair <string, object>("@Balance", balance));
                    parameter.Add(new KeyValuePair <string, object>("@Amount", price));
                    OracleHandler sqlH = new OracleHandler();
                    sqlH.ExecuteNonQuery("usp_aspx_UpdateUsageofGiftCard", parameter);
                }
                catch (Exception e)
                {
                    throw e;
                }
            }
        }
Ejemplo n.º 24
0
 public static void IssueGiftCardForMobile(List <OrderItem> itemList, int orderID, bool isActive, AspxCommonInfo aspxCommonObj)
 {
     foreach (OrderItem orderItemInfo in itemList)
     {
         if (orderItemInfo.IsGiftCard)
         {
             try
             {
                 int giftCardId = GetGiftCardIdByCartItemId(orderItemInfo.CartItemId, aspxCommonObj.StoreID, aspxCommonObj.PortalID);
                 if (giftCardId > 0)
                 {
                     List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj);
                     parameter.Add(new KeyValuePair <string, object>("@GiftCardId", giftCardId));
                     parameter.Add(new KeyValuePair <string, object>("@GiftCardCode", GetGiftCardKey()));
                     parameter.Add(new KeyValuePair <string, object>("@GiftCardPinCode", GetGiftPinCode()));
                     parameter.Add(new KeyValuePair <string, object>("@OrderID", orderID));
                     parameter.Add(new KeyValuePair <string, object>("@IsActive", isActive));
                     parameter.Add(new KeyValuePair <string, object>("@AddedBy", aspxCommonObj.UserName));
                     OracleHandler sqlH = new OracleHandler();
                     sqlH.ExecuteNonQuery("usp_Aspx_IssueGiftCard ", parameter);
                     int typeId = GetGiftCardType(aspxCommonObj.StoreID, aspxCommonObj.PortalID, giftCardId);
                     if (typeId == 1)      //if email type only
                     {
                         NotifyUser(giftCardId, aspxCommonObj);
                     }
                 }
             }
             catch (Exception e)
             {
                 throw e;
             }
         }
     }
 }
Ejemplo n.º 25
0
        public static void AddUpdateUserAddress(AddressInfo addressObj, AspxCommonInfo aspxCommonObj)
        {
            List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetFParamNoSCode(aspxCommonObj);

            parameter.Add(new KeyValuePair <string, object>("AddressID", addressObj.AddressID));
            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));
            OracleHandler sqlH = new OracleHandler();

            sqlH.ExecuteNonQuery("usp_Aspx_AddUpdateUserAddress", parameter);
        }
Ejemplo n.º 26
0
        //-----------Save and update Costvariant options-------------------------

        public static void SaveAndUpdateCostVariant(CostVariantsGetByCostVariantIDInfo variantObj, string variantOptions, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
                parameterCollection.Add(new KeyValuePair <string, object>("CostVariantID", variantObj.CostVariantID));
                parameterCollection.Add(new KeyValuePair <string, object>("CostVariantName", variantObj.CostVariantName));
                parameterCollection.Add(new KeyValuePair <string, object>("Description", variantObj.Description));
                parameterCollection.Add(new KeyValuePair <string, object>("InputTypeID", variantObj.InputTypeID));
                parameterCollection.Add(new KeyValuePair <string, object>("DisplayOrder", variantObj.DisplayOrder));
                parameterCollection.Add(new KeyValuePair <string, object>("ShowInAdvanceSearch", variantObj.ShowInAdvanceSearch));
                parameterCollection.Add(new KeyValuePair <string, object>("ShowInComparison", variantObj.ShowInComparison));
                parameterCollection.Add(new KeyValuePair <string, object>("IsIncludeInPriceRule", variantObj.IsIncludeInPriceRule));
                parameterCollection.Add(new KeyValuePair <string, object>("IsActive", variantObj.IsActive));
                parameterCollection.Add(new KeyValuePair <string, object>("IsModified", variantObj.IsModified));
                parameterCollection.Add(new KeyValuePair <string, object>("VariantOption", variantOptions));
                parameterCollection.Add(new KeyValuePair <string, object>("IsNewFlag", variantObj.Flag));
                OracleHandler sqlH = new OracleHandler();
                sqlH.ExecuteNonQuery("usp_Aspx_SaveAndUpdateCostVariants", parameterCollection);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        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
            {
                OracleHandler sqlH = new OracleHandler();
                sqlH.ExecuteNonQuery("usp_Aspx_StoreLocatorLocationUpdate", parameterCollection);
                return(true);
            }
            catch (Exception e)
            {
                return(false);

                throw e;
            }
        }
Ejemplo n.º 28
0
        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));

                OracleHandler sqlH = new OracleHandler();
                sqlH.ExecuteNonQuery("usp_Aspx_SaveTransactionLog", parameterCollection);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public void SaveCostVariantOptionsFromExcel(List <CostVariantsOptions> optionObj, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();
         parameter.Add(new KeyValuePair <string, object>("Sku", optionObj[0].ColumnValue));
         parameter.Add(new KeyValuePair <string, object>("CostVariantName", optionObj[4].ColumnValue));
         parameter.Add(new KeyValuePair <string, object>("CostVariantValueName", optionObj[5].ColumnValue));
         parameter.Add(new KeyValuePair <string, object>("CostVariantPriceValue", decimal.Parse(optionObj[3].ColumnValue)));
         parameter.Add(new KeyValuePair <string, object>("CostVariantWeightValue", decimal.Parse(optionObj[1].ColumnValue)));
         parameter.Add(new KeyValuePair <string, object>("Quantity", int.Parse(optionObj[2].ColumnValue)));
         parameter.Add(new KeyValuePair <string, object>("Description", ""));
         parameter.Add(new KeyValuePair <string, object>("CultureName", aspxCommonObj.CultureName));
         parameter.Add(new KeyValuePair <string, object>("StoreID", aspxCommonObj.StoreID));
         parameter.Add(new KeyValuePair <string, object>("PortalID", aspxCommonObj.PortalID));
         parameter.Add(new KeyValuePair <string, object>("IsActive", 1));
         parameter.Add(new KeyValuePair <string, object>("InputTypeID", 6));
         parameter.Add(new KeyValuePair <string, object>("DisplayOrder", optionObj[6].ColumnValue));
         OracleHandler sqlH = new OracleHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_SaveCostVariantsFromExcel", parameter);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 30
0
 public static void UpdatePaymentMethod(AspxCommonInfo aspxCommonObj, PaymentGateWayBasicInfo updatePaymentObj)
 {
     try
     {
         var fileObj = new FileHelperController();
         updatePaymentObj.DestinationUrl = updatePaymentObj.DestinationUrl.Substring(updatePaymentObj.DestinationUrl.LastIndexOf("Module"));
         updatePaymentObj.LogoUrl        = fileObj.MoveFile(updatePaymentObj.LogoUrl, updatePaymentObj.DestinationUrl, updatePaymentObj.OldLogoUrl);
         if (updatePaymentObj.LogoUrl == "Modules/AspxCommerce/AspxPaymentGateWayManagement/Logos/")
         {
             updatePaymentObj.LogoUrl = "";
         }
         List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetParamSPU(aspxCommonObj);
         parameterCollection.Add(new KeyValuePair <string, object>("PaymentGatewayTypeID", updatePaymentObj.PaymentGateWayID));
         parameterCollection.Add(new KeyValuePair <string, object>("IsActive", updatePaymentObj.IsActive));
         parameterCollection.Add(new KeyValuePair <string, object>("IsUse", updatePaymentObj.IsUse));
         parameterCollection.Add(new KeyValuePair <string, object>("PaymentGatewayTypeName", updatePaymentObj.PaymentGatewayName));
         parameterCollection.Add(new KeyValuePair <string, object>("LogoUrl", updatePaymentObj.LogoUrl));
         OracleHandler sqlH = new OracleHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_UpdatePaymentMethod", parameterCollection);
     }
     catch (Exception e)
     {
         throw e;
     }
 }