private void btnAdd_Click(object sender, EventArgs e) { if (PriceEditForm.ShowForm(new AnimalTypes())) { InitGrid(); } }
private void btnEdit_Click(object sender, EventArgs e) { var rows = this.gridView1.GetSelectedRows(); if (rows.Length == 1) { var model = (AnimalTypes)gridView1.GetFocusedRow(); //Msg.ShowInformation(model.productName); var ret = PriceEditForm.ShowForm(model); if (ret) { Msg.ShowInformation("修改成功"); InitGrid(); } } else { Msg.Warning("请选择一条需要修改的数据行"); } }