private void LoadCountries() { List <Country> countryList = countryManager.GetAllCountry(); countryGridView.DataSource = countryList; countryGridView.DataBind(); }
private void LoodCountryInGridView() { List <Country> aListOfCities = new List <Country>(); aListOfCities = manager.GetAllCountry(); showGridView.DataSource = aListOfCities; showGridView.DataBind(); }
private void PopulateDropDowns() { List <CSBusiness.Country> countries = CountryManager.GetAllCountry(); ddlShippingCountry.DataSource = countries; ddlShippingCountry.DataBind(); ddlBillingCountry.DataSource = countries; ddlBillingCountry.DataBind(); }
public void LoadCountry() { List <CountryViews> countryViewList = countryManager.GetAllCountry(); countryViewGridView.DataSource = countryViewList; countryViewGridView.DataBind(); countryViewGridView.UseAccessibleHeader = true; countryViewGridView.HeaderRow.TableSection = TableRowSection.TableHeader; }
private void CreatePayPalOrder() { OrderManager orderMgr = new OrderManager(); CSBusiness.OrderManagement.Order orderData = null; NameValueCollection nvcPostData = Request.Form; NameValueCollection nvcQueryString = null; ArrayList skuList = new ArrayList(); Hashtable htRequestInfo = new Hashtable(); Hashtable htResponseInfo = new Hashtable(); Address billingAddress = new Address(); Customer CustData = new Customer();//Set Customer Information List <StateProvince> states = StateManager.GetAllStates(0); List <Country> countries = CountryManager.GetAllCountry(); string strEmail = ""; int intOrderid = 0; string strPayKey = ""; string strTransactionId = ""; if (nvcPostData["ipn_notification_url"] != null) { nvcQueryString = HttpUtility.ParseQueryString(nvcPostData["ipn_notification_url"].ToString().Split('?')[1]); if (nvcQueryString["orderid"] != null) { intOrderid = Convert.ToInt32(nvcQueryString["orderid"].ToString()); } } else { intOrderid = Convert.ToInt32(Request["orderid"].ToString()); } if (nvcPostData["pay_key"] != null) { strPayKey = nvcPostData["pay_key"].ToString(); } if (nvcPostData["transaction[0].id"] != null) { strTransactionId = nvcPostData["transaction[0].id"].ToString(); } if (nvcPostData["sender_email"] != null) { strTransactionId = nvcPostData["sender_email"].ToString(); } if (intOrderid > 0) { orderData = orderMgr.GetOrderDetails(intOrderid, true); //Getting Data from Paypal htRequestInfo.Add("ActionType", "GetShippingAddresses"); htRequestInfo.Add("PayKey", strPayKey); if (OrderHelper.AuthorizeOrderWithPayPalAdaptive(orderData.OrderId, htRequestInfo, out htResponseInfo)) { if (htResponseInfo.ContainsKey("selectedAddress.addresseeName")) { billingAddress.FirstName = CommonHelper.fixquotesAccents(HttpUtility.UrlDecode(htResponseInfo["selectedAddress.addresseeName"].ToString())); billingAddress.LastName = ""; } if (htResponseInfo.ContainsKey("selectedAddress.baseAddress.line1")) { billingAddress.Address1 = CommonHelper.fixquotesAccents(HttpUtility.UrlDecode(htResponseInfo["selectedAddress.baseAddress.line1"].ToString())); billingAddress.Address2 = ""; } if (htResponseInfo.ContainsKey("selectedAddress.baseAddress.postalCode")) { billingAddress.ZipPostalCode = CommonHelper.fixquotesAccents(HttpUtility.UrlDecode(htResponseInfo["selectedAddress.baseAddress.postalCode"].ToString())); } if (htResponseInfo.ContainsKey("selectedAddress.baseAddress.city")) { billingAddress.City = CommonHelper.fixquotesAccents(HttpUtility.UrlDecode(htResponseInfo["selectedAddress.baseAddress.city"].ToString())); } if (htResponseInfo.ContainsKey("selectedAddress.baseAddress.countryCode")) { billingAddress.CountryId = countries.Find(x => x.Code.Trim() == htResponseInfo["selectedAddress.baseAddress.countryCode"].ToString()).CountryId; } if (htResponseInfo.ContainsKey("selectedAddress.baseAddress.state")) { billingAddress.StateProvinceId = states.Find(x => x.Abbreviation.Trim() == htResponseInfo["selectedAddress.baseAddress.state"].ToString()).StateProvinceId; } CustData.FirstName = CommonHelper.fixquotesAccents(billingAddress.FirstName); CustData.LastName = CommonHelper.fixquotesAccents(billingAddress.LastName); CustData.PhoneNumber = ""; CustData.Email = CommonHelper.fixquotesAccents(strEmail); CustData.Username = CommonHelper.fixquotesAccents(strEmail); } CustData.BillingAddress = billingAddress; CustData.ShippingAddress = billingAddress; ClientOrderData.PaymentInfo = orderData.CreditInfo; ClientOrderData.CustomerInfo = CustData; // add rush shipping level to cart object if (!string.IsNullOrEmpty(ddlAdditionShippingCharge.SelectedValue)) { ClientOrderData.CartInfo.ShippingMethod = UserShippingMethodType.Rush; ClientOrderData.CartInfo.ShippingChargeKey = ddlAdditionShippingCharge.SelectedValue; } cartObject = new Cart(); foreach (Sku OrderSKU in orderData.SkuItems) { cartObject.AddItem(OrderSKU.SkuId, OrderSKU.Quantity, true, false); } cartObject.ShippingAddress = ClientOrderData.CustomerInfo.ShippingAddress; cartObject.ShippingMethod = ClientOrderData.CartInfo.ShippingMethod; cartObject.ShippingChargeKey = ClientOrderData.CartInfo.ShippingChargeKey; cartObject.Compute(); cartObject.ShowQuantity = false; ClientOrderData.CartInfo = cartObject; CSResolve.Resolve <IOrderService>().UpdateOrder(orderData.OrderId, ClientOrderData); CSResolve.Resolve <IOrderService>().SaveOrder(orderData.OrderId, strTransactionId, strPayKey, 3); } }
private void BindCategory() { dlCountryList.DataSource = CountryManager.GetAllCountry(); dlCountryList.DataKeyField = "CountryId"; dlCountryList.DataBind(); }
public ActionResult Index() { ViewBag.Countries = countryManager.GetAllCountry(); return(View()); }
/// <summary> /// Retrieve data that is going to be stored in cache /// </summary> /// <returns></returns> protected override object GetData() { List <Country> list = CountryManager.GetAllCountry(); return(list); }
private void GetCountry() { countryViewGridView.DataSource = countryManager.GetAllCountry(); countryViewGridView.DataBind(); }
// GET: /Country/ public ActionResult Index() { var countries = _countryManager.GetAllCountry(); return(View(countries)); }