public override void btnAddNew_Click(object sender, EventArgs e)//新增 { try { ProductsBindingSource.AddNew(); } catch (Exception ex) { MessageBox.Show(ex.Message); } this.productsDataGridView.Refresh(); ReadOnly = false; setReadOnly(); }
public override void btnLast_Click(object sender, EventArgs e)//末筆 { ProductsBindingSource.MoveLast(); }
public override void btnNext_Click(object sender, EventArgs e)//次筆 { ProductsBindingSource.MoveNext(); }
public override void btnPrior_Click(object sender, EventArgs e)//前筆 { ProductsBindingSource.MovePrevious(); }
public override void btnSaveChange_Click(object sender, EventArgs e)//儲存 { ProductsBindingSource.EndEdit(); this.SSEntities.SaveChanges(); ResetProductsData(); }
public override void btnCancelEdit_Click(object sender, EventArgs e)//取消 { ProductsBindingSource.CancelEdit(); ResetProductsData(); }