void RepSplitPay() { if (!SaveData()) { return; } if (bsRows.Current == null || dgvRows.CurrentRow == null || dgvRows.CurrentRow.IsNewRow) { return; } var dr = bsRows.CurrentDataRow as KlonsADataSet.PAYLISTS_RRow; var ad2 = new KlonsA.DataSets.KlonsARepDataSetTableAdapters.SP_PAY_MATCHLISTS_1XTableAdapter(); var tab2 = ad2.GetDataBy_SP_PAY_MATCHLISTS_12(dr.IDAM, dr.PAY, dr.PAYLISTSRow.DT, dr.IDS); var dr2 = tab2[0]; int idam = dr.IDAM; var dt = dr.PAYLISTSRow.DT; var ci = new PayListCalcInfo(true); var ret = ci.Calc(dr, dr2); if (ret != "OK") { MyMainForm.ShowWarning(ret); return; } Form_PayCalc.Show(ci, Form_PayCalc.EReportType.Splitpay); }
public static void Show(PayListCalcInfo ci, EReportType type) { var fm = new Form_PayCalc(); if (type == EReportType.SalarySheetList) { fm.Text = "Izmaksātie algas aprēķini"; fm.lbDates1.Text = "Maksājumu saraksta datums: "; fm.lbDates2.Text = "Apmaksāto algas aprēķinu datumi: "; fm.dgcCaption.Width += 20; } fm.lbName.Text = ci.Name; fm.lbPos.Text = ci.PosTitle; fm.lbDates1.Text += ci.Dates1; fm.lbDates2.Text += ci.Dates2; fm.dgvRows.AutoGenerateColumns = false; fm.bsRows.DataSource = ci.RepRows; fm.ShowDialog(fm.MyMainForm); }
void RepShList() { if (!SaveData()) { return; } if (bsRows.Current == null || dgvRows.CurrentRow == null || dgvRows.CurrentRow.IsNewRow) { return; } var dr = bsRows.CurrentDataRow as KlonsADataSet.PAYLISTS_RRow; var ci = new PayListCalcInfo(true); ci.MakeReportB(dr); Form_PayCalc.Show(ci, Form_PayCalc.EReportType.SalarySheetList); }