private void addToolStripButton_Click(object sender, System.EventArgs e)
 {
     ServiceNormBenefitForm form = new ServiceNormBenefitForm(true, null);
     if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
     {
         ServiceNormBenefit benefit = new ServiceNormBenefit();
         foreach (Benefit benefit2 in form.ListBenefit)
         {
             benefit.BenefitId = benefit2.Id;
             benefit.ServiceId = this.serviceOld.Id;
             benefit.FromDate = form.FromDate;
             benefit.Created = System.DateTime.Now;
             benefit.Rate = form.Rate;
             benefit.Insert();
         }
     }
     this.updToolStripButton_Click(sender, e);
 }
 private void changeToolStripButton_Click(object sender, System.EventArgs e)
 {
     System.Windows.Forms.DataGridViewRow currentRow = this.dgvNormBenefits.CurrentRow;
     ServiceNormBenefitForm form = new ServiceNormBenefitForm(false, currentRow);
     if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
     {
         new ServiceNormBenefit { Id = System.Convert.ToInt64(currentRow.Cells.get_Item("Id").get_Value()), BenefitId = System.Convert.ToInt64(currentRow.Cells.get_Item("BenefitId").get_Value()), ServiceId = this.serviceOld.Id, FromDate = form.FromDate, Created = System.DateTime.Now, Rate = form.Rate }.Update();
     }
     this.updToolStripButton_Click(sender, e);
 }