public MessageResult GoodsTypeDelete(int id) { try { var result = gtBLL.Delete(id); return(MessageResult.Success(result)); } catch (Exception ex) { return(MessageResult.Fail(ex.Message)); } }
/// <summary> /// 删除当前类型 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, EventArgs e) { gtb.Delete(id); this.DialogResult = DialogResult.OK; this.Close(); }