private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (SaleComission.update(Util.getSelectedRowID(grid, col_grid_Id), in_CorrectionAmount.ValueInt, itxt_CorrectionNotes.ValueText, idtp_PaymentDate.Value))
     {
         pnlUpdate.Visible = false;
         populateGrid();
     }
 }
 private void populateGrid()
 {
     if (GlobalData.UserAccount.role != Roles.Super)
     {
         grid.DataSource = SaleComission.get(GlobalData.UserAccount.id, idtp_StartPeriod.getFirstDayOfSelectedMonth());
     }
     else
     {
         grid.DataSource = SaleComission.get(idtp_StartPeriod.getFirstDayOfSelectedMonth());
     }
 }
 private void grid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (GlobalData.UserAccount.role == Roles.Super)
     {
         SaleComission obj = new SaleComission(Util.getSelectedRowID(sender, col_grid_Id));
         in_CorrectionAmount.Value      = obj.CorrectionAmount;
         itxt_CorrectionNotes.ValueText = obj.CorrectionNotes;
         idtp_PaymentDate.Value         = obj.PaymentDate;
         pnlUpdate.Visible = true;
     }
 }
 private void btnGenerate_Click(object sender, EventArgs e)
 {
     SaleComission.generate((DateTime)idtp_GeneratePeriod.getFirstDayOfSelectedMonth());
     populateGrid();
 }