public void EditPlan(MemberShipPlan MemberShipPlan) { MemberShipPlanBeforeEdit = MemberShipPlan; btnReset_Click(null, null); this.Show(); this.Focus(); }
public void NewPlan() { MemberShipPlanBeforeEdit = null; btnReset_Click(null, null); this.Show(); this.Focus(); }
private void btnSave_Click(object sender, EventArgs e) { MemberShipPlan temp = FormToObject(); if (MemberShipPlanBeforeEdit == null) { temp._id = Context.DB.GetID(DBConstants.MemberShipPlanKey); Context.DB.AddNew(temp, DBConstants.MemberShipPlanTable); } else { temp._id = MemberShipPlanBeforeEdit._id; Context.DB.Save(temp, DBConstants.MemberShipPlanTable); MemberShipPlanBeforeEdit = null; } btnReset_Click(null, null); BindGrid(); }