public void BindPlan(Guid subPlanID, ref DropDownList ddl) { var plan = Plan.GetPlanBySubPlanId(subPlanID); List <IPlanMessage> allPlans = Plan.GetProductPalns(plan.ProductName).FindAll(x => x.PlanName == plan.PlanName); BindPlan(allPlans, ref ddl); }
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); }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.DataItem != null) { var orderItem = (IOrderItemMessage)e.Item.DataItem; string labeltext = ""; var plan = Plan.GetPlanBySubPlanId(orderItem.SubPlanID); labeltext = Constant.GetItemDescription(orderItem.DomainName, plan.ProductName, plan.DisplayName); ((Label)e.Item.FindControl("lblItem")).Text = labeltext; DropDownList ddlPlan = e.Item.FindControl("ddlPlan") as DropDownList; ddlPlan.ID = orderItem.DomainName + "_" + orderItem.SubPlanID + "_ddlPlan"; string selectValue = orderItem.SubPlanID.ToString(); ParentBasePage.BindPlan(orderItem.SubPlanID, ref ddlPlan); ddlPlan.SelectedValue = selectValue; } }
private string GetItemDescription(IOrderItemMessage orderItem) { var p = Plan.GetPlanBySubPlanId(orderItem.SubPlanID); return(Constant.GetItemDescription(orderItem.DomainName, p.ProductName, p.DisplayName)); }