void Init() { this.SecondOrderCollections = new List <GroupOrderSecondRender>(); this.IsFirstLoad = true; _userMethodCheckBox = new OrderCheckBox(); _userMethodCheckBox.ValueTextChanged += _userMethodCheckBox_ValueTextChanged; this.AddRender(_userMethodCheckBox); _comboBox = new OrderComboBox(); _comboBox.GotFocus += new EventHandler(_comboBox_GotFocus); this.AddRender(_comboBox); _userDaysTextBox = new OrderTextUnit(); _userDaysTextBox.IsOnlyNum = true; _userDaysTextBox.GotFocus += new EventHandler(_comboBox_GotFocus); this.AddRender(_userDaysTextBox); //执行科室先不显示 _excuteDepartment = new OrderLabel(); _excuteDepartment.IsSuitScreenRelative = true; _excuteDepartment.Format = new StringFormat() { Alignment = StringAlignment.Far, LineAlignment = StringAlignment.Center }; this.AddRender(_excuteDepartment); this._userMethodCheckBox.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(_userMethodCheckBox_MouseDoubleClick); }
public void SetOrderLabel() { var request = new OrderListRequest(this.connectionSettings.AccessToken, this.connectionSettings.ClientSecret); var order = new Order { DocumentNumber = 1, Labels = new List <OrderLabel> { } }; OrderService.UpdateOrderAsync(request, order).GetAwaiter().GetResult(); var response = OrderService.GetOrderAsync(request, 1).GetAwaiter().GetResult(); Assert.IsTrue(response.DocumentNumber == 1); Assert.IsTrue(!response.Labels.Any()); var orderLabel = new OrderLabel { Id = 1 }; order.Labels = new List <OrderLabel>(); order.Labels.Add(orderLabel); OrderService.UpdateOrderAsync(request, order).GetAwaiter().GetResult(); response = OrderService.GetOrderAsync(request, 1).GetAwaiter().GetResult(); Assert.IsTrue(response.DocumentNumber == 1); Assert.IsTrue(response.Labels.Count() == 1); Assert.IsTrue(response.Labels.ElementAt(0).Id == 1); }
private OrderLabel GetOrderDetailByOrderId(int orderId, int storeId, int portalId, string cultureName) { try { if (Session["labelOrderInfo"] != null) { return((OrderLabel)Session["labelOrderInfo"]); } else { List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >(); parameter.Add(new KeyValuePair <string, object>("@OrderId", orderId)); parameter.Add(new KeyValuePair <string, object>("@CultureName", _cultureName)); SQLHandler sqlH = new SQLHandler(); OrderLabel orderDetail = sqlH.ExecuteAsObject <OrderLabel>("usp_Aspx_GetOrderDetailByOrderIdForLabel", parameter); orderDetail.StoreId = storeId; orderDetail.PortalId = portalId; orderDetail.CultureName = cultureName; return(orderDetail); } } catch (Exception ex) { throw ex; } }
private void GetOrderDetails(int storeId, int portalId, int orderId, string cultureName) { try { OrderLabel orderDetail = GetOrderDetailByOrderId(orderId, storeId, portalId, cultureName); if (orderDetail != null) { AddressInfo billingAddress = GetUserBillingAddress(orderDetail.UserBillingAddressId); BindBillingAddress(billingAddress); int providerId = GetShippingProviderIdByShippingMethod(orderDetail.ShippingMethodId); Session["labelOrderInfo"] = orderDetail; lblUserShippingMethod.Text = string.Format("{0}:{1}", "" + getLocale("User Selected Method:") + "", orderDetail.ShippingMethodName); AddressInfo shippingAddress = GetUserShippingAddress(orderDetail.UserShippingAddressId, storeId, portalId); BindShippingAddress(shippingAddress); AspxCommerce.Core.WareHouseAddress wareHouseAddress = GetWareHouseAddress(storeId, portalId); BindWareHouseAddress(wareHouseAddress); BindPackageDetails(orderDetail); } } catch (Exception ex) { throw ex; } }
//for other control in which loading control will occur private void GetOrderDetails(int orderId) { try { List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> > { new KeyValuePair <string, object>("@OrderId", orderId) }; SQLHandler sqlH = new SQLHandler(); OrderLabel orderDetail = sqlH.ExecuteAsObject <OrderLabel>("usp_Aspx_GetOrderDetailByOrderIdForLabel", parameter); Session["labelOrderInfo"] = orderDetail; string path = GetProviderSourceLocation(orderDetail.ShippingMethodId); //if only provider is realtime if (!string.IsNullOrEmpty(path)) { string controlPath = ResolveUrl(@"~/" + path); BaseAdministrationUserControl uc = (BaseAdministrationUserControl)Page.LoadControl(controlPath); phShippingLabelHolder.Controls.Add(uc); } else { //start Custom printing Label dvCustomLabelCreater.Visible = true; ClearSession(orderId); GetOrderDetails(_storeId, _portalId, orderId, GetCurrentCultureName); } } catch (Exception ex) { throw ex; } }
void Init() { _checkBox = new OrderCheckBox(); _checkBox.ValueTextChanged += _checkBox_ValueTextChanged; this.AddRender(_checkBox); _orderLabel = new OrderLabel(); this.AddRender(_orderLabel); _unitTextBox = new OrderTextUnit(); _unitTextBox.GotFocus += new EventHandler(_checkBox_GotFocus); this.AddRender(_unitTextBox); this._checkBox.MouseDoubleClick += new MouseEventHandler(_checkBox_MouseDoubleClick); }
void Init(String treatStyle) { this.TreatStyle = treatStyle; this.IsFirstLoad = true; _treatNameCheckBox = new OrderCheckBox(); _treatNameCheckBox.ValueTextChanged += _treatNameCheckBox_ValueTextChanged; _userNum = new OrderTextUnit(); _userNum.GotFocus += new EventHandler(_userNum_GotFocus); _userNum.MaxUnitWidth = 40; _freqXComboBox = new XComboBox(); _freqXComboBox.GotFocus += new EventHandler(_userNum_GotFocus); _userDays = new OrderTextUnit(); _userDays.GotFocus += new EventHandler(_userNum_GotFocus); _userDays.IsOnlyNum = true; _userDays.MaxUnitWidth = 40; _excuteProject = new OrderLabel(); _excuteProject.IsSuitScreenRelative = true; _orderLabel = new OrderLabel(); _orderLabel.TextBrush = OrderContext.TitleBrush; if (String.IsNullOrEmpty(this.TreatStyle) || (this.TreatStyle.Equals("1")))//诊疗模式为1或者空(默认) { this.AddRender(_treatNameCheckBox); this.AddRender(_orderLabel); this.AddRender(_userNum); this.AddRender(_excuteProject); } else if (this.TreatStyle.Equals("0")) { this.AddRender(_treatNameCheckBox); // this.AddRender(_orderLabel); this.AddRender(_userNum); this.AddRender(_freqXComboBox); this.AddRender(_userDays); this.AddRender(_excuteProject); } this._treatNameCheckBox.MouseDoubleClick += new MouseEventHandler(_treatNameCheckBox_MouseDoubleClick); }
void Init() { this.IsFirstLoad = true; _checkBox = new OrderCheckBox(); _checkBox.ValueTextChanged += _checkBox_ValueTextChanged; this.AddRender(_checkBox); _orderLabel = new OrderLabel(); _orderLabel.TextBrush = new SolidBrush(Color.FromArgb(0, 153, 229)); this.AddRender(_orderLabel); _unitTextBox = new OrderTextUnit(); _unitTextBox.GotFocus += _unitTextBox_GotFocus; this.AddRender(_unitTextBox); this._checkBox.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(_checkBox_MouseDoubleClick); }
private void BindPackageDetails(OrderLabel orderItemsInfo) { string[] itemnames = orderItemsInfo.ItemNames.Split(','); string[] wgts = orderItemsInfo.Weights.Split(','); string[] qtys = orderItemsInfo.ItemQuantities.Split(','); string[] prices = orderItemsInfo.Prices.Split(','); var packageBuilder = new StringBuilder(); int len = itemnames.Length; _itemslist = new List <ItemDetail>(); _itemslist.Clear(); packageBuilder.Append("<table>"); for (int i = 0; i < len; i++) { _itemslist.Add(new ItemDetail() { Description = itemnames[i], Quantity = int.Parse(qtys[i]), Weight = decimal.Parse(wgts[i]), Price = decimal.Parse(prices[i]), }); if (i == 0) { packageBuilder.Append("<tr><th>S.N</th>"); packageBuilder.Append("<th>Product Name</th>"); packageBuilder.Append("<th>Weight</th>"); packageBuilder.Append("<th>Quantity</th>"); packageBuilder.Append("</tr>"); } _totalWeight += decimal.Parse(wgts[i]) * int.Parse(qtys[i]); packageBuilder.Append("<tr>"); packageBuilder.Append("<td>" + i + 1 + "</td>" + "<td>" + itemnames[i] + "</td>" + "<td>" + wgts[i] + "</td>" + "<td>" + qtys[i] + "</td>" ); packageBuilder.Append("</tr>"); } Session["sl_tWeight"] = _totalWeight; Session["sl_items"] = _itemslist; packageBuilder.Append("</table>"); lblPackageTotalWeight.Text = _totalWeight.ToString(); ltPackageDetail.Text = packageBuilder.ToString(); //append to literal }
void Init() { _userMethod = new OrderLabel(); _userMethod.IsSuitScreenRelative = true; this.AddRender(_userMethod); _comboBox = new OrderComboBox(); _comboBox.GotFocus += _comboBox_GotFocus; this.AddRender(_comboBox); _userDaysTextBox = new OrderTextUnit(); _userDaysTextBox.GotFocus += _comboBox_GotFocus; _userDaysTextBox.IsOnlyNum = true; this.AddRender(_userDaysTextBox); //执行科室先不显示 _excuteDepartment = new OrderLabel(); _excuteDepartment.IsSuitScreenRelative = true; this.AddRender(_excuteDepartment); }
private void GetOrderDetails(int storeId, int portalId, int orderId, string cultureName) { try { OrderLabel orderDetail = GetOrderDetailByOrderId(orderId, storeId, portalId, cultureName); if (orderDetail != null) { OriginAddress billingAddress = GetUserBillingAddress(orderDetail.UserBillingAddressId); BindBillingAddress(billingAddress); int providerId = GetShippingProviderIdByShippingMethod(orderDetail.ShippingMethodId); ProviderSetting(providerId, storeId, portalId); Session["labelOrderInfo"] = orderDetail; lblUserShippingMethod.Text = string.Format("{0}:{1}", "User Selected Method:", orderDetail.ShippingMethodName); DestinationAddress shippingAddress = GetUserShippingAddress(orderDetail.UserShippingAddressId, storeId, portalId); BindShippingAddress(shippingAddress); AspxCommerce.Core.WareHouseAddress wareHouseAddress = GetWareHouseAddress(storeId, portalId); BindWareHouseAddress(wareHouseAddress); if (shippingAddress.ToCountry != null && shippingAddress.ToCountry.ToLower().Trim() != "united states" && shippingAddress.ToCountry.ToLower().Trim() != wareHouseAddress.Country.ToLower().Trim()) { int count = rblLabelTypeList.Items.Count; for (int i = 0; i < count; i++) { rblLabelTypeList.Items[i].Enabled = false; } rblLabelTypeList.Items.Add(new ListItem() { Text = "International Label", Selected = true, Value = "internationallabel" }); } BindPackageDetails(orderDetail); } } catch (Exception ex) { ProcessException(ex); } }
void Init() { this.IsFirstLoad = true; _checkBox = new OrderCheckBox(); _checkBox.ValueTextChanged += _checkBox_ValueTextChanged; this.AddRender(_checkBox); _priceLabel = new OrderLabel(); this.AddRender(_priceLabel); _unitTextBox = new OrderTextUnit(); _unitTextBox.GotFocus += new EventHandler(_unitTextBox_GotFocus); this.AddRender(_unitTextBox); _orderLabel = new OrderLabel(); _orderLabel.IsSuitScreenRelative = true; this.AddRender(_orderLabel); this._checkBox.MouseDoubleClick += new MouseEventHandler(_checkBox_MouseDoubleClick); }
void Init() { this.IsFirstLoad = true; this.IsTopLevelNode = true; _checkBox = new OrderCheckBox(); _checkBox.ValueTextChanged += _checkBox_ValueTextChanged; this.AddRender(_checkBox); this._checkBox.MouseDoubleClick += LisFirstOrdrRender_MouseDoubleClick; _orderLabel = new OrderLabel(); _orderLabel.TextBrush = new SolidBrush(Color.FromArgb(0, 153, 229)); this.AddRender(_orderLabel); _departmentLabel = new OrderLabel(); _departmentLabel.TextBrush = new SolidBrush(Color.FromArgb(0, 153, 229)); _departmentLabel.Format = new StringFormat() { LineAlignment = StringAlignment.Center, Alignment = StringAlignment.Far }; this.AddRender(_departmentLabel); }
void Init() { this.SecondOrderCollections = new List <ChineseComplexSecondOrder>(); this.IsFirstLoad = true; _medicalNameCheckBox = new OrderCheckBox(); _medicalNameCheckBox.ValueTextChanged += _userMethodCheckBox_ValueTextChanged; this.AddRender(_medicalNameCheckBox); _useNum = new OrderTextUnit(); _useNum.GotFocus += new EventHandler(_userMethod_GotFocus); this.AddRender(_useNum); _userMethod = new OrderLabel(); _userMethod.IsSuitScreenRelative = true; this.AddRender(_userMethod); _comboBox = new OrderComboBox(); _comboBox.GotFocus += new EventHandler(_userMethod_GotFocus); this.AddRender(_comboBox); _userMethod1 = new OrderLabel(); _userMethod.IsSuitScreenRelative = true; this.AddRender(_userMethod1); //执行科室先不显示 _excuteDepartment = new OrderLabel(); _excuteDepartment.IsSuitScreenRelative = true; _excuteDepartment.Format = new StringFormat() { Alignment = StringAlignment.Far, LineAlignment = StringAlignment.Center }; this.AddRender(_excuteDepartment); this._medicalNameCheckBox.MouseDoubleClick += new MouseEventHandler(_medicalNameCheckBox_MouseDoubleClick); }
public void AddObj(OrderLabel obj) { OrderLabelBLL.GetInstance().Add(obj); }