private void btnSave_Click(object sender, EventArgs e) { try { if (String.IsNullOrEmpty(this.cardIdTextBox.Text)) { if (this.lookUpEditBrand.EditValue == null) { YYMessageBox.Show("品牌不能为空."); return; } //新增 ServiceCardCategory.insert(this.lookUpEditBrand.EditValue.ToString(), this.cardNameTextBox.Text.Trim(), this.hideInSalesTextBox.Text); } else { //新增 //ServiceCardBrand.update(this.brandIdTextBox.Text, this.brandNameTextBox.Text.Trim()); } DialogResult = System.Windows.Forms.DialogResult.OK; this.Close(); } catch (Exception ex) { YYMessageBox.Show(ex); } }
private void itemDelBrand_Click(object sender, EventArgs e) { try { } catch (Exception ex) { YYMessageBox.Show(ex); } }
private void itemAddBrand_Click(object sender, EventArgs e) { try { FormCardBrandDetail frm = new FormCardBrandDetail(); if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { queryBrand(); } } catch (Exception ex) { YYMessageBox.Show(ex); } }
private void toolStripMenuItemAddCard_Click(object sender, EventArgs e) { try { string selBrandId = gridViewCardBrand.GetFocusedRowCellValue("BrandId").ToString(); FormCardCategoryDetail frm = new FormCardCategoryDetail(); frm.brandId = selBrandId; if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { queryCardCategory(selBrandId); } } catch (Exception ex) { YYMessageBox.Show(ex); } }
private void btnSave_Click(object sender, EventArgs e) { try { if (String.IsNullOrEmpty(this.brandIdTextBox.Text)) { //新增 ServiceCardBrand.insert(this.brandNameTextBox.Text.Trim()); } else { //新增 ServiceCardBrand.update(this.brandIdTextBox.Text, this.brandNameTextBox.Text.Trim()); } DialogResult = System.Windows.Forms.DialogResult.OK; this.Close(); } catch (Exception ex) { YYMessageBox.Show(ex); } }