Exemplo n.º 1
0
        protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            try
            {
                if (e.Item.DataItem != null)
                {
                    IOrderItemMessage orderItem = (IOrderItemMessage)e.Item.DataItem;
                    ((Label)e.Item.FindControl("lblItem")).Text = orderItem.DomainName;
                    if (GetDescription == null)
                    {
                        ((Label)e.Item.FindControl("lblActionDecscription")).Text = GetItemDiscription(orderItem);
                    }
                    else
                    {
                        ((Label)e.Item.FindControl("lblActionDecscription")).Text = GetDescription(orderItem);
                    }

                    if (PaymentAwaited)
                    {
                        ((Label)e.Item.FindControl("lblInvoiceId")).Text = "Payment Awaited";
                    }
                    else
                    {
                        ((Label)e.Item.FindControl("lblInvoiceId")).Text = orderItem.InvoiceNumber.Trim() == "" ? "Under Process" : orderItem.InvoiceNumber;
                    }

                    ((Label)e.Item.FindControl("lblPrice")).Text = Plan.GetCurrencySymbol() + Plan.GetPlanBySubPlanId(orderItem.SubPlanID).Price.ToString();
                    amount += Plan.GetPlanBySubPlanId(orderItem.SubPlanID).Price;
                }
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 2
0
        private void SaveOrderItem(IOrderItemMessage item, Guid orderID, int status)
        {
            string cmdText = "insert into [OrderItem] (ID,orderID,SubPlanID,DomainName,Status,EnableSsl,EnableMaintenance,InvoiceNumber,Description,UpdateDate)  values (NewID()," +
                             "'" + orderID.ToString() + "'," +
                             "'" + item.SubPlanID + "'," +
                             "'" + item.DomainName + "'," +
                             "" + status.ToString() + "," +
                             "" + (item.EnableSsl ? "1" : "0") + "," +
                             "" + (item.EnableMaintenance ? "1" : "0") + "," +
                             "'" + item.InvoiceNumber + "'," +
                             "'" + item.Description + "'," +
                             "GetDate())";

            connection.ExecuteSQL(cmdText);
        }
Exemplo n.º 3
0
        private string GetItemDiscription(IOrderItemMessage orderItem)
        {
            string       description = "";
            IPlanMessage planMsg     = null;

            switch (orderItem.Status)
            {
            case Constant.OrderItemStatusProcessed:
                planMsg     = Plan.GetPlanBySubPlanId(orderItem.SubPlanID);
                description = Constant.GetItemDescription("", planMsg.ProductName, planMsg.DisplayName) +
                              " for " + planMsg.Year.ToString() + (planMsg.Year > 1 ? " years" : " year");
                break;

            default:
                planMsg     = Plan.GetPlanBySubPlanId(orderItem.SubPlanID);
                description = Constant.GetItemDescription("", planMsg.ProductName, planMsg.DisplayName) +
                              " for " + planMsg.Year.ToString() + (planMsg.Year > 1 ? " years" : " year");
                break;
            }
            return(description);
        }
Exemplo n.º 4
0
 public void SetSelectedWebServiceNULL()
 {
     selectedWebservice = null;
 }
Exemplo n.º 5
0
 public void SetSelectedWebservice(Guid subPlanId, bool enableSsl, bool enableMaintenance)
 {
     selectedWebservice = new OrderItemMessage(subPlanId, "", enableSsl, enableMaintenance);
     dirtyFlag          = true;
 }
        private string GetItemDescription(IOrderItemMessage orderItem)
        {
            var p = Plan.GetPlanBySubPlanId(orderItem.SubPlanID);

            return(Constant.GetItemDescription(orderItem.DomainName, p.ProductName, p.DisplayName));
        }