示例#1
0
        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);
        }
示例#2
0
        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);
        }