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);
     }
 }
Beispiel #2
0
 private void queryCardCategory(string brandId)
 {
     gridCardCategory.DataSource = ServiceCardCategory.queryByCol("brandId", brandId);
 }