/// <summary> /// 修改时绑定信息 /// </summary> private void EditBind() { this.Txtbh.Enabled = false; this.rdPayType.Enabled = false; this.dzpanel.Visible = false; string OrderId = GetOrderId(); //绑定产品树 ProductTree myTree = new ProductTree(); myTree.Orderid = OrderId; this.menuLabel.Text = myTree.getEditMenu10Again(GetStoreId(), GetOrderId()); //绑定产品信息 UptTree(OrderId); //绑定订单信息 this.Txtbh.Enabled = false;//修改时会员编号不能修改 MemberOrderModel mo = MemberOrderAgainBLL.GetMemberOrderByOrderId(OrderId); this.Txtbh.Text = mo.Number; this.Txtxm.Text = Encryption.Encryption.GetDecipherName(mo.Consignee); this.Txtyb.Text = mo.ConZipCode; this.Email.Text = mo.ConPost; this.Txtjtdh.Text = Encryption.Encryption.GetDecipherTele(mo.ConTelPhone); this.Txtyddh.Text = Encryption.Encryption.GetDecipherTele(mo.ConMobilPhone); this.CountryCity1.SelectCountry(mo.ConCity.Country, mo.ConCity.Province, mo.ConCity.City, mo.ConCity.Xian); this.Txtdz.Text = Encryption.Encryption.GetDecipherAddress(mo.ConAddress); this.rdPayType.SelectedValue = mo.DefrayType.ToString(); this.Txtbz.Text = mo.Remark; if (mo.DefrayState.ToString() == "1") { this.rdPayType.Enabled = false; } if (this.rdPayType.SelectedValue == "2") { this.dzpanel.Visible = true; this.txtdzbh.Text = mo.ElectronicaccountId; } this.DropCurrency.SelectedValue = mo.PayCurrency.ToString();//支付币种 DDLSendType.SelectedValue = mo.SendWay.ToString(); this.TxtStore.Text = GetStoreId(); GetBindAddress(); string addess = mo.ConCity.Country + " " + mo.ConCity.Province + " " + mo.ConCity.City + " " + mo.ConCity.Xian + " " + mo.ConAddress; this.rbtAddress.SelectedValue = addess; }
/// <summary> /// MemberOrderModel类对象赋值 /// </summary> /// <returns></returns> public MemberOrderModel AddOrdrer(string orderId, decimal totalMoney, decimal totalPv) { MemberOrderModel mo = new MemberOrderModel(); mo.Number = this.Txtbh.Text; mo.OrderId = orderId; mo.StoreId = GetStoreId(); mo.TotalMoney = Convert.ToDecimal(MemberOrderAgainBLL.GetBzMoney(GetStoreId(), Convert.ToDouble(totalMoney)));//获得标准币种 mo.TotalPv = totalPv; mo.OrderExpect = CommonDataBLL.getMaxqishu(); mo.PayExpect = CommonDataBLL.getMaxqishu(); mo.IsAgain = 1; mo.OrderDate = DateTime.Now; mo.Err = ""; mo.Remark = this.Txtbz.Text; mo.DefrayState = 1; mo.PayCurrency = Convert.ToInt32(DropCurrency.SelectedValue); mo.PayMoney = Convert.ToDecimal(MemberOrderAgainBLL.GetBzMoney(GetStoreId(), Convert.ToDouble(totalMoney)) / MemberOrderAgainBLL.GetBzHl(mo.PayCurrency)); mo.StandardCurrency = MemberOrderAgainBLL.GetBzTypeId(GetStoreId()); mo.StandardcurrencyMoney = totalMoney; mo.OperateIp = CommonDataBLL.OperateIP; mo.OperateNumber = GetStoreId(); mo.DefrayType = Convert.ToInt32(this.rdPayType.SelectedValue); mo.CarryMoney = 0; mo.RemittancesId = ""; mo.ElectronicaccountId = this.txtdzbh.Text.Trim(); mo.OrderType = 1; if (panel2.Visible) { mo.ConCity.Country = this.CountryCity1.Country; mo.ConCity.Province = this.CountryCity1.Province; mo.ConCity.City = this.CountryCity1.City; mo.ConAddress = Encryption.Encryption.GetEncryptionAddress(this.Txtdz.Text); } else { string addressRbt = this.rbtAddress.SelectedItem.Text.Trim(); string gas523 = this.rbtAddress.SelectedValue; string[] addr = addressRbt.Split(' '); mo.ConCity.Country = addr[0].ToString(); mo.ConCity.Province = addr[1].ToString(); mo.ConCity.City = addr[2].ToString(); mo.ConAddress = Encryption.Encryption.GetEncryptionAddress(addr[3].ToString()); } mo.ConTelPhone = Encryption.Encryption.GetEncryptionTele(this.Txtjtdh.Text.Trim()); mo.ConMobilPhone = Encryption.Encryption.GetEncryptionTele(this.Txtyddh.Text.Trim()); mo.ConPost = this.Email.Text.Trim(); mo.Consignee = Encryption.Encryption.GetEncryptionName(Txtxm.Text.Trim()); mo.ConZipCode = this.Txtyb.Text.Trim(); mo.SendWay = Convert.ToInt32(DDLSendType.SelectedValue); //如果已经支付的报单 if (IsEdit()) { MemberOrderModel moOld = MemberOrderAgainBLL.GetMemberOrderByOrderId(orderId); mo.OrderDate = moOld.OrderDate; mo.OrderExpect = moOld.OrderExpect; mo.PayExpect = moOld.PayExpect; mo.DefrayState = moOld.DefrayState; mo.IsAgain = moOld.IsAgain; mo.OrderType = moOld.OrderType; } return(mo); }