private void AddPositionButton_Click(object sender, EventArgs e) { ManageForm manage_form = new ManageForm(0, "", "", "", "", (int)OperationType.Add); manage_form.ShowDialog(); manage_form.Close(); UpdateGrids(); }
private void DeletePositionButton_Click(object sender, EventArgs e) { DataRowView CurrentRow = StoreGridView1.GetFocusedRow() as DataRowView; int CurrentId = Int32.Parse(CurrentRow["id"].ToString()); string CurrentQuantity = CurrentRow["quantity"].ToString(); string CurrentPrice = CurrentRow["price"].ToString(); string CurrentFirstPrice = CurrentRow["first_price"].ToString(); string CurrentPosition = CurrentRow["position"].ToString(); ManageForm manage_form = new ManageForm(CurrentId, CurrentPosition, CurrentQuantity, CurrentPrice, CurrentFirstPrice, (int)OperationType.Delete); manage_form.ShowDialog(); manage_form.Close(); UpdateGrids(); }