/// <summary> /// 添加的时,绑定信息 /// </summary> private void AddBind() { //绑定产品树 ProductTree myTree = new ProductTree(); this.menuLabel.Text = myTree.getMenuShoppingFx(BLL.CommonClass.CommonDataBLL.getManageID(2)); }
protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs e) { ProductTree pTree = new ProductTree(); lblmenu.Text = pTree.GetSMSProductTreeXZ(ddlCountry.SelectedValue); // lblName.Text = AddNewProductBLL.GetMoreCurrencyNameByCountryCode(ddlCountry.SelectedValue); }
/// <summary> /// 修改时绑定信息 /// </summary> private void EditBind() { //绑定产品树 ProductTree myTree = new ProductTree(); this.menuLabel.Text = myTree.getEditMenuShopping(BLL.CommonClass.CommonDataBLL.getManageID(2), ViewState["ProductID"].ToString()); }
public void Update(ProductTree productTree) { lock (thisLock) { string xmlText; using (var textWriter = new StringWriter()) { new XmlSerializer(typeof(TreeNode)).Serialize(textWriter, productTree.Tree.core.data); xmlText = textWriter.ToString(); } using (var model = new gb_dvsstagingEntities()) { var productTreeModel = model.dvs_producttree.Find(productTree.Id); productTreeModel.ProductId = productTree.ProductId; productTreeModel.XmlText = xmlText; productTreeModel.UpdatedOn = DateTime.UtcNow; model.Entry(productTreeModel).State = System.Data.Entity.EntityState.Modified; model.SaveChanges(); } } }
/// <summary> /// 添加的时,绑定信息 /// </summary> private void AddBind() { //购货店铺,默认为注册店铺 TxtStore.Text = GetStoreId(); //绑定产品树 ProductTree myTree = new ProductTree(); this.menuLabel.Text = myTree.getMemberProductList(GetStoreId()); //绑定会员信息 MemberInfoModel mi = MemberInfoModifyBll.getMemberInfo(GetMember()); lblNumber.Text = mi.Number; lblName.Text = Encryption.Encryption.GetDecipherName(mi.Name); this.Txtxm.Text = Encryption.Encryption.GetDecipherName(mi.Name); this.Txtyb.Text = mi.PostalCode; this.Email.Text = mi.Email; this.Txtjtdh.Text = Encryption.Encryption.GetDecipherTele(mi.HomeTele); this.Txtyddh.Text = Encryption.Encryption.GetDecipherTele(mi.MobileTele); //this.CountryCity1.SelectCountry(mi.City.Country, mi.City.Province, mi.City.City,mi.City.Xian); //this.Txtdz.Text = Encryption.Encryption.GetDecipherAddress(mi.Address); //this.rdPayType.Enabled = true; //this.rdPayType.AutoPostBack = true; //this.dzpanel.Visible = false; }
public IActionResult Index() { string path = _configuration["WebApiUrl"].ToString() + "api/Product"; string json = RequestHelper.Get(path); var products = JsonConvert.DeserializeObject <List <BillOfMaterials.Web.Models.Product> >(json); List <ProductTree> productTreeList = new List <ProductTree>(); foreach (var product in products) { List <CategoryTree> mainCategoryTreeList = new List <CategoryTree>(); foreach (var category in product.categories) { string path2 = _configuration["WebApiUrl"].ToString() + "api/Product/" + category.id.ToString(); string json2 = RequestHelper.Get(path2); var subcategories = JsonConvert.DeserializeObject <List <SubCategory> >(json2); List <CategoryTree> categoryTreeList = new List <CategoryTree>(); foreach (var subcategory in subcategories) { CategoryTree categoryTree = new CategoryTree() { id = subcategory.id, name = subcategory.name, categories = new List <CategoryTree>() }; categoryTreeList.Add(categoryTree); } CategoryTree mainCategoryTree = new CategoryTree() { id = category.id, name = category.name, categories = categoryTreeList }; mainCategoryTreeList.Add(mainCategoryTree); } ProductTree tree = new ProductTree() { id = product.id, name = product.name, categories = mainCategoryTreeList }; productTreeList.Add(tree); } return(new JsonResult(productTreeList)); }
/// <summary> /// 添加的时,绑定信息 /// </summary> private void AddBind() { //绑定产品树 ProductTree myTree = new ProductTree(); this.menuLabel.Text = myTree.getMenu10Again(GetStoreId()); this.rdPayType.Enabled = true; this.rdPayType.AutoPostBack = true; this.dzpanel.Visible = false; }
/// <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; }
protected void TxtStore_TextChanged(object sender, EventArgs e) { //验证店铺编号是否存在 if (!MemberOrderAgainBLL.CheckStore(GetStoreId())) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "click", "alert('" + GetTran("001779", "对不起,您输入的店铺不存在!") + "');", true); return; } //绑定产品树 ProductTree myTree = new ProductTree(); this.menuLabel.Text = myTree.getMenu10(GetStoreId()); AddOrderBLL.BindCurrency_Rate(this.DropCurrency, GetStoreId()); }
async public Task Insert(ProductTree entity) { IBatchProducer batch = _serviceLayerConnector.CreateBatch(); batch = _serviceLayerConnector.CreateBatch(); string record = toJsonComponete(entity); batch.Post(HttpMethod.Post, "/ProductTrees", record); ServiceLayerResponse response = await _serviceLayerConnector.Post(batch); if (!response.success) { string message = $"Erro ao enviar transação de '{entity.EntityName}': {response.errorCode}-{response.errorMessage}"; Console.WriteLine(message); throw new ApplicationException(message); } else { ProductTreeIntegrationStatus status = ProductTreeIntegrationStatus.Processed; if (response.internalResponses.Where(x => x.errorCode == "-2035").ToList().Count == 0) { if (response.internalResponses.Count(m => !m.success) != 0) { status = ProductTreeIntegrationStatus.Error; } } var prod = toJsonComponent(status); foreach (var item in entity.productTrees_Lines) { string query = Global.BuildQuery($"U_VSITPRODUCT_COMP('{item.RecId}')"); var responseStatus = await _serviceLayerConnector.Patch(query, prod, true); if (!responseStatus.success) { string message = $"Erro ao atualizar status de '{entity.EntityName}': {response.errorCode}-{response.errorMessage}"; Console.WriteLine(message); throw new ApplicationException(message); } } } }
private string toJsonComponete(ProductTree productTree) { string result = string.Empty; dynamic record = new ExpandoObject(); record.TreeCode = productTree.TreeCode; record.TreeType = productTree.TreeType; record.Warehouse = productTree.Warehouse; var q = from p in productTree.productTrees_Lines select new { p.ItemCode, p.Quantity, p.Warehouse }; var lista = q.ToList(); record.ProductTreeLines = lista; result = JsonConvert.SerializeObject(record); return(result); }
private void ShoppingBind(ArrayList list) { ProductTree myTree = new ProductTree(); string manageId = BLL.CommonClass.CommonDataBLL.getManageID(2); this.menuLabel.Text = myTree.getEditMenuShopp(manageId, list); //绑定产品信息 string result = "<script language='javascript'>"; foreach (MemberDetailsModel memberDetailsModel in list) { this.hidpids.Value += ",N" + memberDetailsModel.ProductId; result = result + "Form1.N" + memberDetailsModel.ProductId + ".value=" + memberDetailsModel.Quantity; result += ";"; } result += "</script>"; this.Label1.Text = result; }
/// <summary> /// 产生树形菜单 /// </summary> /// <param name="dian"></param> public void setProductMenu(string countryCode) { ProductTree myTree = new ProductTree(); this.menuLabel.Text = myTree.GetCountryProduct(countryCode); }
protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs e) { ProductTree pTree = new ProductTree(); lblmenu.Text = pTree.GetProductTree(ddlCountry.SelectedValue); }
/// <summary> /// 产生树形菜单 /// </summary> /// <param name="dian"></param> public void setProductMenu(string countryCode, string WareHouseID, string DepotSeat) { ProductTree myTree = new ProductTree(); this.menuLabel.Text = myTree.GetDepotSeatProduct(countryCode, WareHouseID, DepotSeat); }
public Task Delete(ProductTree entity) { throw new NotImplementedException(); }
/// <summary> /// 产生树形菜单 /// </summary> /// <param name="dian"></param> public void setProductMenu(string storID) { ProductTree myTree = new ProductTree(); this.menuLabel.Text = myTree.getMenuStore(storID, 1, 0); }
/// <summary> /// 产生树形菜单 /// </summary> /// <param name="dian"></param> public void setProductMenu(string storID, string OrderId) { ProductTree myTree = new ProductTree(); this.menuLabel.Text = myTree.getEditMenu10(storID, OrderId).Replace("../", ""); }