private void LoadCustomer(string email)
        {
            ICustomer customer = ApiObjectFactory.GetObject <ResellerClub.Interface.ICustomer>();

            customer.GetCustomerDetailByUserName(email);
            SessionM["Customer"] = customer;
        }
Beispiel #2
0
        private static void LoadPlans()
        {
            var subPlanProductMapping = new Dictionary <Guid, IPlanMessage>();
            List <ResellerClub.Interface.Messages.IPlanMessage> planList;
            var plan = ApiObjectFactory.GetObject <ResellerClub.Interface.IPlan>();

            planList = plan.GetPlans();
            //   _LinuxHostingPlan = planList.FindAll(x => x.ProductName == "linux_hosting_plan");
            //  _WindowsHostingPlan = planList.FindAll(x => x.ProductName == "windows_hosting_plan");
            Cache.Set(Constant.SingleDomainHostingLinuxUs, planList.FindAll(x => x.ProductName == Constant.SingleDomainHostingLinuxUs));
            Cache.Set(Constant.SingleDomainHostingWindowsUs, planList.FindAll(x => x.ProductName == Constant.SingleDomainHostingWindowsUs));
            Cache.Set(Constant.EmailHosting, planList.FindAll(x => x.ProductName == Constant.EmailHosting));
            Cache.Set(Constant.DomainRegistration, planList.FindAll(x => x.ProductName == Constant.DomainRegistration));
            Cache.Set(Constant.StandardWebSite, planList.FindAll(x => x.ProductName == Constant.StandardWebSite));
            Cache.Set(Constant.EComWebSite, planList.FindAll(x => x.ProductName == Constant.EComWebSite));
            Cache.Set(Constant.WebSiteBuilder, planList.FindAll(x => x.ProductName == Constant.WebSiteBuilder));

            Cache.Set(Constant.SSL_FSSL, planList.FindAll(x => x.ProductName == Constant.SSL_FSSL));
            Cache.Set(Constant.SSL_SGC, planList.FindAll(x => x.ProductName == Constant.SSL_SGC));
            Cache.Set(Constant.SSL_SSL123, planList.FindAll(x => x.ProductName == Constant.SSL_SSL123));
            Cache.Set(Constant.SSL_WILD, planList.FindAll(x => x.ProductName == Constant.SSL_WILD));

            Cache.Set("AllPlan", planList);

            foreach (var p in planList)
            {
                subPlanProductMapping[p.SubPlanID] = p;
            }

            Cache.Set("SubPlanProductMapping", subPlanProductMapping);
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            divUserMsg.Style["display"] = "none";

            if (IsPostBack)
            {
                var customer = ApiObjectFactory.GetObject <ResellerClub.Interface.ICustomer>();
                message = "";
                var success = customer.ChangePassword(txtEmailID.Text, txtOldPassword.Text, txtPassword.Text, out message);
                divUserMsg.Style["display"] = "block";
                if (success)
                {
                    DisplayInfo(message);
                    RegisterStartUpScript("$('#divContainer').hide();");

                    Dictionary <string, string> replaceString = new Dictionary <string, string>();
                    replaceString["<%=useremail%>"]  = customer.CusInfo.Email;
                    replaceString["<%=CustomerId%>"] = customer.CusInfo.CustomerID;


                    SendEmail("New_User_Registration_Email_Format.htm", "Confirmation of your Customer Registration with InfoWeb Services", customer.CusInfo.Email, replaceString);
                }
                else
                {
                    DisplayError(message);
                }
            }
        }
        private void SendEmail(string paymentMode)
        {
            TextWriter     tw    = new StringWriter();
            HtmlTextWriter hw    = new HtmlTextWriter(tw);
            IOrder         order = ApiObjectFactory.GetObject <IOrder>();
            var            dt    = order.GetOrder((Guid)SessionM["OrderId"]);

            InvoiceDetail1.RenderControl(hw);
            var customer = (ICustomer)SessionM["Customer"];

            Email = customer.CusInfo.Email;
            Dictionary <string, string> replaceString = new Dictionary <string, string>();

            replaceString["<%=CustomerName%>"] = Helper.ToProperCase(customer.CusInfo.Name);
            replaceString["<%=CustomerId%>"]   = customer.CusInfo.CustomerID;
            replaceString["<%=OrderDetail%>"]  = tw.ToString();
            replaceString["<%=OrderNumber%>"]  = dt.Rows[0]["OrderNumber"].ToString();

            string orderUpdateLink = Request.Url.AbsoluteUri;

            orderUpdateLink = orderUpdateLink.Replace(Request.FilePath, "/Payment/UpdatePaymentReference.aspx");

            orderUpdateLink = "<a href=" + orderUpdateLink + "?rid=" + SessionM["OrderId"].ToString() + " >" + orderUpdateLink + "</a>";


            replaceString["<%=OrderUpdateLink%>"] = orderUpdateLink;

            SendEmail(GetEmailHtmlFile(paymentMode), "Order Detail", customer.CusInfo.Email, replaceString);
        }
        private void ExistingCustomer()
        {
            ApiObjectFactory.GetObject <ResellerClub.Interface.IDomain>();
            //     ResellerClub.BusinessLogic.Customer customer = new ResellerClub.BusinessLogic.Customer(authUser, authPassword);
            ResellerClub.Interface.ICustomer customer = ApiObjectFactory.GetObject <ResellerClub.Interface.ICustomer>();


            //     customer.GetCustomerDetailByUserName(Request["input_email"]);
            trRegistrationForm.Style["display"] = "none";
            trUserOption.Style["display"]       = "";

            if (customer.ValidateCustomer(Request["input_email"], Request["password"]))
            {
                Guid sessionFID = Guid.NewGuid();
                SessionM["Customer"]   = customer;
                SessionM["SessionFID"] = sessionFID;
                ResellerClub.Interface.ISessionLogger sessionLogger = ApiObjectFactory.GetObject <ResellerClub.Interface.ISessionLogger>();
                sessionLogger.Insert(sessionFID,
                                     SessionM.AspSessionId(),
                                     customer.CusInfo.Email,
                                     UserIPAddress());


                RedirectAfterLogin();
            }
            else
            {
                divError.Style["display"] = "";
                divError.InnerHtml        = "<div>Invalid Email ID or Password</div>";
            }
        }
Beispiel #6
0
        private void GetCountryState(string countryCode)
        {
            var state     = ApiObjectFactory.GetObject <ResellerClub.Interface.IState>();
            var stateList = state.GetCountryState(countryCode);
            var json      = Util.ObjectToJason(stateList);

            _context.Response.Write(json);
        }
        private void LoadOrder(out string paymentMode)
        {
            divOrderDetail.Visible = true;
            IOrder order = ApiObjectFactory.GetObject <IOrder>();
            var    dt    = order.GetOrder((Guid)SessionM["OrderId"]);

            OrderNumber = dt.Rows[0]["OrderNumber"].ToString();
            paymentMode = dt.Rows[0]["PaymentMode"].ToString();
        }
Beispiel #8
0
        public static string GetUserEmailByOrderId(string orderId, out string orderNumber)
        {
            IOrder order = ApiObjectFactory.GetObject <IOrder>();
            var    dt    = order.GetOrder(new Guid(orderId));

            orderNumber = dt.Rows[0]["OrderNumber"].ToString();
            Guid           sessionID  = (Guid)dt.Rows[0]["SessionID"];
            ISessionLogger sessionLog = ApiObjectFactory.GetObject <ISessionLogger>();

            return(sessionLog.GetUserEmail(sessionID));
        }
Beispiel #9
0
        private void SaveOrder()
        {
            var     order     = ApiObjectFactory.GetObject <ResellerClub.Interface.IOrder>();
            var     cartItems = UserCart.Items;
            decimal amount    = cartItems.Sum(x => Plan.GetPlanBySubPlanId(x.SubPlanID).Price);

            Plan.GetPlanBySubPlanId(cartItems[0].SubPlanID);
            var orderId = order.SaveOrder(UserCart.Items, (Guid)SessionM["SessionFID"], amount);

            SessionM["OrderId"] = orderId;
            order.UpdatePaymentMode(orderId, paymentMode);
        }
        private void RegisterCustomer()
        {
            if (!ValidateInput())
            {
                return;
            }

            ResellerClub.Interface.ICustomer customer = ApiObjectFactory.GetObject <ResellerClub.Interface.ICustomer>();
            //  ResellerClub.Interface.Messages.ICustomerInfoMessage cusInfo = new ResellerClub.BusinessLogic.Messages.CustomerInfoMessage();
            customer.CusInfo.Name             = input_fullname.Value;
            customer.CusInfo.Password         = passwd.Value;
            customer.CusInfo.Company          = input_companyname.Value;
            customer.CusInfo.Country          = country.Value;
            customer.CusInfo.State            = string.Compare(Request[stateSelect.UniqueID], "other", StringComparison.InvariantCultureIgnoreCase) == 0 ? Request[input_otherState.UniqueID] : Request[stateSelect.UniqueID];
            customer.CusInfo.City             = select_city.Value;
            customer.CusInfo.ZipCode          = input_zip.Value;
            customer.CusInfo.PhoneNumber      = input_phone.Value;
            customer.CusInfo.PhoneCountryCode = input_phone_cc.Value;
            customer.CusInfo.AddressLine1     = input_address1.Value;
            customer.CusInfo.Email            = username.Value;
            customer.CusInfo.Language         = "en";

            try
            {
                customer.Register();
                customer.GetCustomerDetailByUserName(username.Value);

                Guid sessionFID = Guid.NewGuid();
                SessionM["Customer"]   = customer;
                SessionM["SessionFID"] = sessionFID;
                ResellerClub.Interface.ISessionLogger sessionLogger = ApiObjectFactory.GetObject <ResellerClub.Interface.ISessionLogger>();
                sessionLogger.Insert(sessionFID,
                                     SessionM.AspSessionId(),
                                     customer.CusInfo.Email,
                                     UserIPAddress());


                if (UserCart.Items.Count > 0)
                {
                    Response.Redirect(Application["rootPath"].ToString() + "/Payment/PaymentOption.aspx");
                }
                else
                {
                    Response.Redirect(Application["rootPath"].ToString() + "/Home.aspx");
                }
            }
            catch (ResellerClub.BusinessLogic.ServerException ex)
            {
                ShowErrorMessage(ex.Message);
            }
        }
Beispiel #11
0
        private void UpdatePayementTranscationNumber()
        {
            if (txtTranscationNumber.Text == "")
            {
                DisplayError("Transcation Number Required");
                return;
            }

            IOrder order = ApiObjectFactory.GetObject <IOrder>();

            order.UpdatePaymentTranNumber(orderId, txtTranscationNumber.Text);
            RegisterStartUpScript("$('#divContainer').hide();");

            DisplayInfo("Your payment confirmation number is updated. Your order will get executed as soon as we will verify your payment confirmation number");
        }
        protected void Page_PreRender(object sender, EventArgs e)
        {
            TextWriter     tw    = new StringWriter();
            HtmlTextWriter hw    = new HtmlTextWriter(tw);
            IOrder         order = ApiObjectFactory.GetObject <IOrder>();
            var            dt    = order.GetOrder((Guid)SessionM["OrderId"]);

            InvoiceDetail1.RenderControl(hw);

            var customer = (ICustomer)SessionM["Customer"];

            OrderNumber = dt.Rows[0]["OrderNumber"].ToString();

            Dictionary <string, string> replaceString = new Dictionary <string, string>();

            replaceString["<%=CustomerName%>"] = Helper.ToProperCase(customer.CusInfo.Name);
            replaceString["<%=CustomerId%>"]   = customer.CusInfo.CustomerID;
            replaceString["<%=OrderDetail%>"]  = tw.ToString();
            replaceString["<%=OrderNumber%>"]  = dt.Rows[0]["OrderNumber"].ToString();
            SendEmail("Order.htm", "Order Detail", customer.CusInfo.Email, replaceString);
        }
Beispiel #13
0
        private void ProcessDomainSerachResult()
        {
            try
            {
                if (!ValidateDomainName(SessionM["UserEnteredDomain"].ToString()))
                {
                    DisplayError("Domain name entered by you contains some invalid character.");
                    return;
                }

                DomainSearchControl domainSearchControl = (DomainSearchControl)this.plhSearchControl.FindControl("domainSearchControl");
                var domain      = ApiObjectFactory.GetObject <ResellerClub.Interface.IDomain>();
                var list        = Plan.TopLevelDomainList;
                var domainLst   = domain.SearchDomain(SessionM["UserEnteredDomain"].ToString(), list);
                var pDomainInfo = domainLst.Find(x => x.DomainName == SessionM["UserEnteredDomain"].ToString() + SessionM["UserSelectedTDLs"].ToString());
                if (pDomainInfo != null)
                {
                    trDomainAvailable.Visible = true;
                    tdDomainName.InnerText    = SessionM["UserEnteredDomain"].ToString() + SessionM["UserSelectedTDLs"].ToString();
                    BindPlan(Plan.GetTopLevelDomainPlan(SessionM["UserSelectedTDLs"].ToString()), ref ddlPrimeDominPlan);

                    domainLst.Remove(pDomainInfo);
                    SessionM["domainLst"] = domainLst;
                    LoadAvailableDomainControl();
                    AvailableDomainList availableDomainList = (AvailableDomainList)this.plhSearchControl.FindControl("availableDomainList");
                    availableDomainList.BindData(domainLst);
                    plhSearchControl.Visible      = false;
                    trDisplaySearchResult.Visible = true;
                    divAmountStrip.Visible        = true;
                }
                else
                {
                    trDomainNotAvailable.Visible = true;
                }
            }
            catch (ServerException ex)
            {
                DisplayError("Server Error");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            string password = "";

            if (!IsPostBack)
            {
                txtEmailID.Text = Request.QueryString["useremail"];
            }

            if (IsPostBack)
            {
                var customer = ApiObjectFactory.GetObject <ResellerClub.Interface.ICustomer>();

                var success = customer.GenerateTempPassword(txtEmailID.Text, out message, out password);
                if (success)
                {
                    RegisterStartUpScript("$('#divContainer').hide();");

                    message = "Your password have been mailed to " + txtEmailID.Text + "<br>" +
                              "Be sure to check your Junk folder if you do not see an email from us in your Inbox within a few minutes";

                    Dictionary <string, string> replaceString = new Dictionary <string, string>();
                    replaceString["<%=useremail%>"]     = customer.CusInfo.Email;
                    replaceString["<%=CustomerId%>"]    = customer.CusInfo.CustomerID;
                    replaceString["<%=password%>"]      = password;
                    replaceString["<%=userIpAddress%>"] = Helper.GetIPAddress();

                    SendEmail("Forgot_Password.htm", "Password Retrieval for your Infoweb services account", customer.CusInfo.Email, replaceString);
                    DisplayInfo(message);
                }
                else
                {
                    DisplayError(message);
                }
            }
        }
Beispiel #15
0
        private static void LoadTopLevelDomain()
        {
            var domain = ApiObjectFactory.GetObject <ResellerClub.Interface.IDomain>();

            Cache.Set(Constant.TopLevelDomain, domain.GetTopLevelDomian());
        }
Beispiel #16
0
        protected void Application_Error(object sender, EventArgs e)
        {
            Exception      lastServerException = null;
            var            url          = HttpContext.Current.Request.Url.AbsoluteUri;
            SessionManager sessionM     = new SessionManager();
            string         addtonalInfo = "";

            try
            {
                addtonalInfo += Environment.NewLine + " SessionValues :" + sessionM.ToJasonString();
            }
            catch { }
            try
            {
                var requestInputStream = new StreamReader(HttpContext.Current.Request.InputStream);
                var requestContent     = requestInputStream.ReadToEnd();
                requestInputStream.Close();
                addtonalInfo += Environment.NewLine + " Request :" + requestContent;
            }
            catch { }

            try
            {
                Nullable <Guid> sessionId = null;
                lastServerException = Server.GetLastError();

                if (sessionM["SessionFID"] != null)
                {
                    sessionId = (Guid)sessionM["SessionFID"];
                }
                var logger = ApiObjectFactory.GetObject <ResellerClub.Interface.IExceptionLogger>();

                logger.LogException(lastServerException, sessionId, Helper.GetIPAddress(), url, addtonalInfo, lastServerException.GetHashCode(), 0);
            }
            catch (Exception ex)
            {
                if (lastServerException != null)
                {
                    XmlTraceWriter.TraceInfo("=========================================================");
                    XmlTraceWriter.Trace(lastServerException);
                    XmlTraceWriter.Trace(ex);
                    XmlTraceWriter.TraceInfo("=========================================================");
                }
                else
                {
                    XmlTraceWriter.Trace(ex);
                }
            }
            finally
            {
                var exceptionInErrorPage = false;
                try
                {
                    Server.Execute("/Error.aspx");
                }
                catch (Exception ex)
                {
                    exceptionInErrorPage = true;
                }

                if (exceptionInErrorPage)
                {
                    Response.Redirect("/Error.htm");
                }
                else
                {
                    Response.Redirect("/Error.aspx");
                }
            }
        }
Beispiel #17
0
 public static void fun()
 {
     ICustomer obj = ApiObjectFactory.GetObject <ICustomer>();
 }