public static void Update(Marketplace marketplace) { var marketplaceCard = new MarketplaceCard(); marketplaceCard.GetData(marketplace); var changed = marketplaceCard.ShowDialog() == DialogResult.OK; if (changed) { //marketplace.ReApply(); Context.Save(); } }
private void GetData(Marketplace market) { _marketplace = market; txtUrl.Text = market.Url; txtTitle.Text = market.Title; txtDescription.Text = market.Description; SetStyle(market.GetActiveStyle()); txtActive.Checked = market.Active; }
private void Choose() { var row = (DataSourceRow)gridView1.GetFocusedRow(); if (row == null) { return; } _marketplace = row.GetMarketplace(); DialogResult = DialogResult.OK; }
public Adv24au(Product product, AdvCategory category, Marketplace market) { Product = product; Category = category; Marketplace = market; Days = DeafaultDays; DateUpdate = DateTime.Now; DateExpire = DateTime.Now; Active = true; }
private bool SetData(Marketplace market) { if (txtTitle.Text.IsEmpty()) { MessageBox.Show("Не указано название"); return false; } //market.Url =txtUrl.Text; market.Title = txtTitle.Text; market.Description = txtDescription.Text; market.SetActiveStyle(_style); market.Active = txtActive.Checked; return true; }
public DataSourceRow(Marketplace marketplace) { _marketplace = marketplace; Title = marketplace.Title; }
public DataSourceRow(Marketplace Marketplace) { _Marketplace = Marketplace; }
public void ApplyStyles(Product product, BegemotProduct bproduct, Style specialStyle, Style saleStyle, Style marketStyle, Marketplace market, Adv24au adv) { //bool isNoStyles = specialStyle == null && saleStyle == null && marketStyle == null; var activeSale = product.GetActiveSale(); Style defultStyle = Style.GetDefault(); valueDict = new Dictionary<string, string>(); AddToDict(product, bproduct, specialStyle, activeSale); AppleResult ar = null; ar = Apply(defultStyle, StyleType.SpecialDescrition); ar = Apply(specialStyle, StyleType.SpecialDescrition); ar = Apply(saleStyle, StyleType.Sale); ar = Apply(marketStyle, StyleType.MarketPlace); ar.ClearTags(); //ar.ClearPolicyWords(market); var title = ar.GetResultTitle(); var description = ar.GetResultDescription(); if (adv == null) { product.Title = title; product.Description = description; } else { title = market.PrepareTitle(title); description = market.PrepareDescription(description); adv.Title = title; adv.Description = description; } }