public ActionResult Edit(int id) { var shop = _shopService.GetById(id); var shopForm = ShopForm.FromShop(shop); return(View(shopForm)); }
private void backBtn_Click(object sender, EventArgs e) { ShopForm sf = new ShopForm(currentUser); sf.Show(); this.Hide(); }
public void backForm() { ShopForm sf = new ShopForm(currentUser); sf.Show(); this.Hide(); }
private void button9_Click(object sender, EventArgs e) { try { sport.Close(); ShopForm formDialog = new ShopForm(); formDialog.ShowDialog(); sport.Open(); } catch (Exception ex) { List <Label> Labels = new List <Label>(); Labels.Add(MyLabel.SetOKLabel("General Error")); Labels.Add(MyLabel.SetOKLabel(ex.Message)); List <Button> Buttons = new List <Button>(); Buttons.Add(MyButton.SetOKThemeButton()); MyMessageBox.Show( Labels, "", Buttons, MyImage.SetFailed()); } }
private void магазинToolStripMenuItem_Click(object sender, EventArgs e) { this.Hide(); ShopForm shopForm = new ShopForm(); shopForm.Show(); }
public ActionResult Detail(int id) { var shop = _shopService.GetById(id); var shopForm = ShopForm.FromShop(shop); ViewBag.ShowApprovalButtons = User.IsInRole(RolesNames.Admin) && shop.StatusId == StatusEnum.Pending; return(View(shopForm)); }
public ActionResult Edit(int id, ShopForm shopForm) { if (!ModelState.IsValid) { return(View(shopForm)); } _shopService.Edit(shopForm.ToShop(), shopForm.Email); return(RedirectToAction("Index", new ShopListFiltersModel().GetRouteValues()).WithSuccess("Comercio Editado")); }
public async Task <ActionResult> Create(ShopForm shopForm) { if (!ModelState.IsValid) { return(View(shopForm)); } var shop = shopForm.ToShop(); try { shop.StatusId = StatusEnum.Approved; await _shopService.Create(shop, shopForm.Email, AppSettings.Theme); await _notificationService.SendAccountConfirmationEmail(shop.UserId, AppSettings.Theme); } catch (ApplicationException ex) { this.ModelState.AddModelError("", ex.Message); return(View(shopForm)); } return(RedirectToAction("Index", new ShopListFiltersModel().GetRouteValues()).WithSuccess("Comercio Creado")); }
public ActionResult Create() { var shopForm = new ShopForm(); return(View(shopForm)); }
public SearchClient(Form parent) { InitializeComponent(); _shopForm = parent as ShopForm; }
public Main(ShopForm shopForm, ProfileForm profileForm) { InitializeComponent(); this.profileForm = profileForm; this.shopForm = shopForm; }