public SaveCarriageCostTemplateCtrl(EmCarriageCostTemplate template)
        {
            InitializeComponent();
            try
            {
                new DataGridViewPagingSumCtrl(dataGridView1).Initialize();
                curTemp = template;
                Initialize();

                if (curTemp != null)
                {
                    JGNet.Core.Dev.InteractEntity.CarriageCost cost = GlobalCache.EMallServerProxy.GetCarriageCost(curTemp.AutoID);

                    this.skinComboBoxDeliveryTime.SelectedItem = cost.CarriageCostTemplate.DeliveryTime;
                    numericTextBoxDefaultCarriageCost.Value    = cost.CarriageCostTemplate.DefaultCarriageCost;

                    String[] addresses = cost.CarriageCostTemplate.GoodsAddress.Split('-');
                    skinComboBoxProvince.SelectedValue = addresses[0];
                    skinComboBoxCity.SelectedValue     = addresses[1];
                    skinComboBoxCityArea.SelectedValue = addresses[2];
                    skinCheckBox_State.Checked         = cost.CarriageCostTemplate.IsValid;
                    skinTextBoxTitle.Text = cost.CarriageCostTemplate.Name;

                    List <CarriageCost> costs = CarriageCostUtil.GetAllCarriageCost(cost.CarriageCostDetails);
                    list = costs;
                    this.dataGridView1.DataSource = list;
                }
                else
                {
                    //设置默认的宝贝地址
                    EMall eMall = GlobalCache.EMallServerProxy.GetEMall();
                    if (eMall != null && !String.IsNullOrEmpty(eMall.ShopAddress))
                    {
                        String[] addresses = eMall.ShopAddress.Split('-');
                        skinComboBoxProvince.SelectedValue = addresses[0];
                        skinComboBoxCity.SelectedValue     = addresses[1];
                        String[] detailAddress = addresses[2].Split(',');
                        skinComboBoxCityArea.SelectedValue = detailAddress[0];
                    }
                }
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
        }
Beispiel #2
0
        internal static InteractResult EMall_OnUpdate(EMall curEMall)
        {
            InteractResult result = GlobalCache.EMallServerProxy.UpdateEMall(curEMall);

            return(result);
        }
Beispiel #3
0
 /// <summary>
 /// 修改线上商城信息。
 /// </summary>
 /// <returns></returns>
 public InteractResult UpdateEMall(EMall eMall)
 {
     byte[] response = this.engine.CustomizeOutter.Query(EMallInformationTypes.UpdateEMall, SerializeHelper.ResultToSerialize(eMall));
     return(CompactPropertySerializer.Default.Deserialize <InteractResult>(response, 0));
 }
Beispiel #4
0
 /// <summary>
 /// 修改线上店铺信息。
 /// </summary>
 /// <returns></returns>
 public UpdateResult UpdateEMall(EMall eMall)
 {
     byte[] response = this.engine.CustomizeOutter.Query(EMallInformationTypes.UpdateEMall, SerializeHelper.ResultToSerialize(eMall));
     return((UpdateResult)SerializeHelper.ByteArrayToInt(response));
 }