示例#1
0
        private void BindHeader(RefundOrScrapApplyform applyform)
        {
            RefundApplyform refundForm = applyform as RefundApplyform;
            OrderRole       orderRole  = BasePage.GetOrderRole(applyform.Order);

            lblApplyformId.Text    = applyform.Id.ToString();
            linkOrderId.HRef       = "OrderDetail.aspx?id=" + applyform.OrderId.ToString() + "&returnUrl=" + HttpUtility.UrlEncode(Request.Url.PathAndQuery);
            linkOrderId.InnerText  = applyform.OrderId.ToString();
            this.lblApplyType.Text = string.Format("{0} {1}", applyform,
                                                   refundForm != null ? (string.Format("({0})", refundForm.RefundType.GetDescription())) : string.Empty);
            //var product = applyform.Order.IsThirdRelation ? applyform.Order.Supplier.Product : applyform.Order.Provider.Product;
            var product = applyform.Order.Provider.Product;

            if (product is SpeicalProductInfo)
            {
                var specialProductInfo = product as SpeicalProductInfo;
                this.lblProductType.Text = applyform.Order.Product.ProductType.GetDescription() + "(" + specialProductInfo.SpeicalProductType.GetDescription() + ")";
            }
            else
            {
                this.lblProductType.Text = product.ProductType.GetDescription();
            }
            lblStatus.Text = StatusService.GetRefundApplyformStatus(applyform.Status, orderRole);
            if (applyform.Order.Provider != null && applyform.Order.Provider.Product is Service.Order.Domain.CommonProductInfo)
            {
                this.lblTicketType.Text = (applyform.Order.Provider.Product as Service.Order.Domain.CommonProductInfo).TicketType.ToString();
            }
            else
            {
                this.lblTicketType.Text = "-";
            }

            lblPNR.Text  = AppendPNR(applyform.NewPNR, string.Empty);
            lblPNR.Text += AppendPNR(applyform.OriginalPNR, string.IsNullOrWhiteSpace(lblPNR.Text) ? string.Empty : "原编码:");
        }
示例#2
0
        private string getRoleStatus(StatusInfo <TSystemStatus> statusInfo, OrderRole role)
        {
            if (statusInfo != null)
            {
                switch (role)
                {
                case OrderRole.Platform:
                    return(statusInfo.Platform);

                case OrderRole.Purchaser:
                    return(statusInfo.Purchaser);

                case OrderRole.Provider:
                    return(statusInfo.Provider);

                case OrderRole.Supplier:
                    return(statusInfo.Supplier);

                case OrderRole.OEMOwner:
                    return(statusInfo.DistributionOEM);

                default:
                    break;
                }
            }
            return(string.Empty);
        }
示例#3
0
        private void BindHeader(BalanceRefundApplyform applyform)
        {
            OrderRole orderRole = BasePage.GetOrderRole(applyform.Order);

            lblApplyformId.Text    = applyform.Id.ToString();
            linkOrderId.HRef       = "OrderDetail.aspx?id=" + applyform.OrderId.ToString() + "&returnUrl=" + HttpUtility.UrlEncode(Request.Url.PathAndQuery);
            linkOrderId.InnerText  = applyform.OrderId.ToString();
            this.lblApplyType.Text = "差额退款";
            var product = applyform.Order.Provider.Product;

            if (product is SpeicalProductInfo)
            {
                var specialProductInfo = product as SpeicalProductInfo;
                this.lblProductType.Text = applyform.Order.Product.ProductType.GetDescription() + "(" + specialProductInfo.SpeicalProductType.GetDescription() + ")";
            }
            else
            {
                this.lblProductType.Text = product.ProductType.GetDescription();
            }
            lblStatus.Text = StatusService.GetBalanceRefundStatus(applyform.BalanceRefundStatus, orderRole);
            if (applyform.Order.Provider != null && applyform.Order.Provider.Product is Service.Order.Domain.CommonProductInfo)
            {
                this.lblTicketType.Text = (applyform.Order.Provider.Product as Service.Order.Domain.CommonProductInfo).TicketType.ToString();
            }
            else
            {
                this.lblTicketType.Text = "-";
            }

            lblPNR.Text  = AppendPNR(applyform.NewPNR, string.Empty);
            lblPNR.Text += AppendPNR(applyform.OriginalPNR, string.IsNullOrWhiteSpace(lblPNR.Text) ? string.Empty : "原编码:");
        }
示例#4
0
        private void bindHeader(RefundOrScrapApplyform applyform)
        {
            var       refundForm = applyform as RefundApplyform;
            OrderRole orderRole  = OrderRole.Provider;

            lblApplyformId.Text = applyform.Id.ToString();
            linkOrderId.HRef    = "OrderDetail.aspx?id=" + applyform.OrderId.ToString() + "&returnUrl=" +
                                  HttpUtility.UrlEncode(Request.Url.PathAndQuery);
            linkOrderId.InnerText = applyform.OrderId.ToString();
            lblApplyType.Text     = string.Format("{0} {1}", applyform,
                                                  refundForm != null ? (string.Format("({0})", refundForm.RefundType.GetDescription())) : string.Empty);
            //var product = applyform.Order.IsThirdRelation ? applyform.Order.Supplier.Product : applyform.Order.Provider.Product;
            var product = applyform.Order.Provider.Product;

            if (product is SpeicalProductInfo)
            {
                var specialProductInfo = product as SpeicalProductInfo;
                this.lblProductType.Text = applyform.Order.Product.ProductType.GetDescription() + "(" + specialProductInfo.SpeicalProductType.GetDescription() + ")";
            }
            else
            {
                this.lblProductType.Text = product.ProductType.GetDescription();
            }



            lblStatus.Text = StatusService.GetRefundApplyformStatus(applyform.Status, orderRole);
            if (applyform.Order.Provider != null && applyform.Order.Provider.Product is CommonProductInfo)
            {
                lblTicketType.Text = (applyform.Order.Provider.Product as CommonProductInfo).TicketType.ToString();
            }
            else
            {
                lblTicketType.Text = "-";
            }
            lblPNR.Text  = AppendPNR(applyform.NewPNR, string.Empty);
            lblPNR.Text += AppendPNR(applyform.OriginalPNR, string.IsNullOrWhiteSpace(lblPNR.Text) ? string.Empty : "原编码:");

            lblAppliedTime.Text   = applyform.AppliedTime.ToString("yyyy-MM-dd");
            lblAppliedReason.Text = applyform.ApplyRemark;

            if (applyform.Order.Provider != null && applyform.Order.Provider.PurchaserRelationType != RelationType.Brother)
            {
                lblRelation.Text           = applyform.Order.Provider.PurchaserRelationType.GetDescription() + "-";
                hrefPurchaseName.InnerHtml = applyform.Order.Purchaser.Company.UserName + "(" + applyform.Order.Purchaser.Name + ")";
                hrefPurchaseName.HRef      = "/OrganizationModule/RoleModule/ExtendCompanyManage/LowerComapnyInfoUpdate/LowerCompanyDetailInfo.aspx?CompanyId="
                                             + applyform.Order.Purchaser.CompanyId.ToString() +
                                             "&Type=" + (applyform.Order.Provider.PurchaserRelationType == RelationType.Interior ? "Organization" : "Junion");
            }
            else
            {
                lblRelation.Text         = "平台采购";
                hrefPurchaseName.Visible = false;
            }
        }
示例#5
0
        public Dictionary <TSystemStatus, string> GetRoleStatus(OrderRole role)
        {
            var result = new Dictionary <TSystemStatus, string>();

            foreach (var item in this.Statuses)
            {
                var status = getRoleStatus(item.Value, role);
                if (!string.IsNullOrWhiteSpace(status))
                {
                    result.Add(item.Key, status);
                }
            }
            return(result);
        }
示例#6
0
        private string InitDetailUrl(OrderRole companyType)
        {
            switch (companyType)
            {
            case OrderRole.Platform:
                return("/OrderModule/Operate/PostponeApplyformDetail.aspx?id=");

            case OrderRole.Purchaser:
                return("/OrderModule/Purchase/PostponeApplyformDetail.aspx?id=");

            default:
                return("/OrderModule/Provide/PostponeApplyformDetail.aspx?id=");
            }
        }
示例#7
0
 private static string GetProcessStatus(ApplyformListView form, OrderRole orderRole)
 {
     if (form.ApplyformType == ApplyformType.Postpone)
     {
         return(Service.Order.StatusService.GetPostponeApplyformStatus((PostponeApplyformStatus)form.ApplyDetailStatus, orderRole));
     }
     else if (form.ApplyformType == ApplyformType.BlanceRefund)
     {
         return(Service.Order.StatusService.GetBalanceRefundStatus((BalanceRefundProcessStatus)form.ApplyDetailStatus, orderRole));
     }
     else
     {
         return(Service.Order.StatusService.GetRefundApplyformStatus((RefundApplyformStatus)form.ApplyDetailStatus, orderRole));
     }
 }
示例#8
0
        private void bindBill(Service.Order.Domain.Applyform.RefundOrScrapApplyform applyform)
        {
            OrderRole orderRole = GetOrderRole(applyform.Order);

            if (orderRole == OrderRole.Supplier && applyform.Status == RefundApplyformStatus.Refunded ||
                (orderRole == OrderRole.Provider && (applyform.Status == RefundApplyformStatus.Refunded || applyform.Status == RefundApplyformStatus.AgreedByProviderBusiness))
                )
            {
                this.bill.Visible = true;
                this.bill.InitData(applyform.RefundBill);
            }
            else
            {
                this.bill.Visible = false;
            }
        }
示例#9
0
 private void bindPassengers()
 {
     if (this.m_order != null && this.m_passengers != null)
     {
         _CurrentOrderRole = BasePage.GetOrderRole(m_order);
         var passengersInfo = "<table>" + drawTitle() + drawContents() + "</table>";
         if (this.m_mode == Mode.Itinerary)
         {
             passengersInfo += "<div><input type='button' value='打印行程告知单' class='btn class1' style='float:right;'/></div>";
         }
         if (!string.IsNullOrEmpty(m_ETDZCondition) && _CurrentOrderRole != OrderRole.Provider)
         {
             passengersInfo +=
                 "<div id=\"Condition\"><h3 class=\"titleBg\"><span >出票条件</span></h3></div><div ><div>" + m_ETDZCondition + "</div></div>";
         }
         this.divPassengers.InnerHtml = passengersInfo;
     }
 }
示例#10
0
 /// <summary>
 /// 获取订单状态列表
 /// </summary>
 /// <param name="role">订单角色</param>
 public static Dictionary <OrderStatus, string> GetRoleOrderStatus(OrderRole role)
 {
     return(OrderStatusAdapter.Instance.GetRoleStatus(role));
 }
示例#11
0
 /// <summary>
 /// 根据角色获取差额退款单的状态
 /// </summary>
 /// <param name="status"> </param>
 /// <param name="role"> </param>
 /// <returns></returns>
 public static string GetBalanceRefundStatus(BalanceRefundProcessStatus status, OrderRole role)
 {
     return(BalanceRefundStatusAdapter.Instance.GetStatus(status, role));
 }
示例#12
0
 /// <summary>
 /// 获取退/废票状态列表
 /// </summary>
 /// <param name="role">订单角色</param>
 public static Dictionary <RefundApplyformStatus, string> GetRoleRefundApplyformStatus(OrderRole role)
 {
     return(RefundStatusAdapter.Instance.GetRoleStatus(role));
 }
示例#13
0
 /// <summary>
 /// 获取改期状态列表
 /// </summary>
 /// <param name="role">订单角色</param>
 public static Dictionary <PostponeApplyformStatus, string> GetRolePostponeApplyformStatus(OrderRole role)
 {
     return(PostponeStatusAdapter.Instance.GetRoleStatus(role));
 }
示例#14
0
 /// <summary>
 /// 获取订单状态
 /// </summary>
 /// <param name="status">系统状态</param>
 /// <param name="role">订单角色</param>
 public static string GetOrderStatus(OrderStatus status, OrderRole role)
 {
     return(OrderStatusAdapter.Instance.GetStatus(status, role));
 }
示例#15
0
        public string GetStatus(TSystemStatus systemStatus, OrderRole role)
        {
            var statusInfo = GetStatusInfo(systemStatus);

            return(getRoleStatus(statusInfo, role));
        }
示例#16
0
 /// <summary>
 /// 获取改期状态
 /// </summary>
 /// <param name="status">系统状态</param>
 /// <param name="role">订单角色</param>
 public static string GetPostponeApplyformStatus(PostponeApplyformStatus status, OrderRole role)
 {
     return(PostponeStatusAdapter.Instance.GetStatus(status, role));
 }
示例#17
0
 /// <summary>
 /// 获取退/废票状态
 /// </summary>
 /// <param name="status">系统状态</param>
 /// <param name="role">订单角色</param>
 public static string GetRefundApplyformStatus(RefundApplyformStatus status, OrderRole role)
 {
     return(RefundStatusAdapter.Instance.GetStatus(status, role));
 }
示例#18
0
 public Coordination(string account, string content, string result, BusinessType type, ContactMode mode, DateTime time, OrderRole role)
 {
     this.Account   = account;
     this.Content   = content;
     this.Result    = result;
     this.Type      = type;
     this.Mode      = mode;
     this.Time      = time;
     this.OrderRole = role;
 }
示例#19
0
 /// <summary>
 /// 根据角色获取差额退款单的状态
 /// </summary>
 /// <param name="role"> </param>
 /// <returns></returns>
 public static Dictionary <BalanceRefundProcessStatus, string> GetBalanceRefundStatus(OrderRole role)
 {
     return(BalanceRefundStatusAdapter.Instance.GetRoleStatus(role));
 }
示例#20
0
        public CreateOrderRelationWindow(AdministrateRolesWindow administrateRolesWindow, Order order, OrderRole orderRole)
        {
            InitializeComponent();

            this.administrateRolesWindow = administrateRolesWindow;
            this.orderRole = orderRole;
            this.order     = order;

            WebserviceObject wsObj = WebserviceCalls.GetUsers();

            List <User> usersList = new List <User>();

            if (wsObj.Success)
            {
                foreach (User obj in (List <object>)wsObj.Response)
                {
                    usersList.Add(obj);
                }
            }
            else
            {
                MessageBox.Show(wsObj.Response.ToString());
            }

            ObservableCollection <object> oList = new ObservableCollection <object>(usersList);

            dgUsers.ItemsSource = oList;

            wsObj = WebserviceCalls.GetRoles();

            List <Role> rolesList = new List <Role>();

            if (wsObj.Success)
            {
                foreach (Role obj in (List <object>)wsObj.Response)
                {
                    rolesList.Add(obj);
                }
            }
            else
            {
                MessageBox.Show(wsObj.Response.ToString());
            }

            oList = new ObservableCollection <object>(rolesList);

            dgRoles.ItemsSource = oList;

            if (orderRole != null)
            {
                Title             = "TimeRegistrationApp - Update order relation";
                btnCreate.Content = "Update order relation";

                var user = usersList.Where(x => x.UserId == orderRole.UserId).FirstOrDefault();

                dgUsers.SelectedItem = user;

                var role = rolesList.Where(x => x.RoleId == orderRole.RoleId).FirstOrDefault();

                dgRoles.SelectedItem = role;

                dgUsers.IsEnabled = false;
            }
        }