public void UpdateListMatch(KlonsADataSet.PAYLISTS_RRow dr) { /* * var ad = new KlonsA.DataSets.KlonsARepDataSetTableAdapters.SP_PAY_MATCHLISTSTableAdapter(); * var tab = ad.GetData_SP_REP_PAY_MATCHLISTS_02(dr.IDAM, dr.PAY, dr.PAYLISTSRow.DT); * var pr = tab[0]; * DataTasks.FillPayRowB(dr, pr); */ 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 pr2 = tab2[0]; DataTasks.FillPayRowC(dr, pr2); }
public void WriteTo2(KlonsADataSet.PAYLISTS_RRow dr) { if ((dr.IsID_SHR_2Null()? (int?)null : dr.ID_SHR_2) == ID_SHR && dr.PAY_TAXED_2 == PAY_TAXED && dr.PAY_NOSAI_2 == PAY_NOSAI && dr.PAY_NOTTAXED_2 == PAY_NOTTAXED && dr.UNTAXED_MINIMUM_2 == UNTAXED_MINIMUM && dr.IINEX_DEPENDANTS_2 == IINEX_DEPENDANTS && dr.IINEX2_2 == IINEX2 && dr.IINEX2_TP_2 == IINEX2_TP && dr.DNSI_2 == DNSI && dr.PFNT_2 == PFNT && dr.LINT_2 == LINT && dr.HINT_2 == HINT && dr.IINEX_EXP_2 == IINEX_EXP && dr.IIN_2 == IIN) { return; } dr.BeginEdit(); if (ID_SHR == null) { dr.SetID_SHR_2Null(); } else { dr.ID_SHR_2 = ID_SHR.Value; } dr.PAY_TAXED_2 = PAY_TAXED; dr.PAY_NOSAI_2 = PAY_NOSAI; dr.PAY_NOTTAXED_2 = PAY_NOTTAXED; dr.UNTAXED_MINIMUM_2 = UNTAXED_MINIMUM; dr.IINEX_DEPENDANTS_2 = IINEX_DEPENDANTS; dr.IINEX2_2 = IINEX2; dr.IINEX2_TP_2 = IINEX2_TP; dr.DNSI_2 = DNSI; dr.PFNT_2 = PFNT; dr.LINT_2 = LINT; dr.HINT_2 = HINT; dr.IINEX_EXP_2 = IINEX_EXP; dr.IIN_2 = IIN; dr.EndEdit(); }
public void MakeReportB(KlonsADataSet.PAYLISTS_RRow dr) { idp = dr.IDP; int idam = dr.IDAM; Name = DataTasks.GetPersonName(idp); PosTitle = DataTasks.GetPositionTitle(idam); Dates1 = Utils.DateToString(dr.PAYLISTSRow.DT); Dates2 = Utils.DateToString(dr.DT1) + " - " + Utils.DateToString(dr.DT2); var ad = new KlonsA.DataSets.KlonsARepDataSetTableAdapters.SP_PAY_MATCHLISTS_2XTableAdapter(); var tab = ad.GetDataBy_SP_PAY_MATCHLISTS_21(dr.ID); for (int i = 0; i < tab.Count; i++) { var dri = tab[i]; var dts = Utils.DateToString(dri.DT1) + " - " + Utils.DateToString(dri.DT2); var cr = new PayCalcRow(dts); cr.SetFrom(dri); RepRows.Add(cr); } }
public string Calc(KlonsADataSet.PAYLISTS_RRow dr, KlonsARepDataSet.SP_PAY_MATCHLISTS_1XRow dr_x) { var sr1 = new PayCalcRow(); var paid1 = new PayCalcRow(); PayCalcRow rpay1 = null; var sr2 = new PayCalcRow(); var paid2 = new PayCalcRow(); PayCalcRow rpay2 = null; if (PreparingReport) { idp = dr.IDP; Name = DataTasks.GetPersonName(idp); PosTitle = DataTasks.GetPositionTitle(dr_x.IDAM); } if (!dr_x.IsIDSHR1Null() && dr.R1 < 1.0f) { sr1.SetFromA1(dr_x); paid1.SetFromA2(dr_x); sr1.HAS_TAXDOC = DataTasks.IsPersonWithTaxDoc(dr.IDP, sr1.DT1, sr1.DT2); paid1.HAS_TAXDOC = sr1.HAS_TAXDOC; if (PreparingReport) { Dates1 = Utils.DateToString(sr1.DT1) + " - " + Utils.DateToString(sr1.DT2); RepRows.Add(new PayCalcRow("Aprēķins 1") { IsTitle = true }); } var ret = Calc2(sr1, paid1, dr_x.PAY1, out rpay1); if (ret != "OK") { if (!PreparingReport) { PayCalcRow.Empty.WriteTo1(dr); } return(ret); } if (!PreparingReport) { rpay1.WriteTo1(dr); } } else { if (!PreparingReport) { PayCalcRow.Empty.WriteTo1(dr); } } if (!dr_x.IsIDSHR2Null() && dr.R2 < 1.0f) { sr2.SetFromB1(dr_x); paid2.SetFromB2(dr_x); sr2.HAS_TAXDOC = DataTasks.IsPersonWithTaxDoc(dr.IDP, sr2.DT1, sr2.DT2); paid2.HAS_TAXDOC = sr2.HAS_TAXDOC; if (PreparingReport) { Dates2 = Utils.DateToString(sr2.DT1) + " - " + Utils.DateToString(sr2.DT2); RepRows.Add(new PayCalcRow("Aprēķins 2") { IsTitle = true }); } var ret = Calc2(sr2, paid2, dr_x.PAY2, out rpay2); if (ret != "OK") { if (!PreparingReport) { PayCalcRow.Empty.WriteTo2(dr); } return(ret); } if (!PreparingReport) { rpay2.WriteTo2(dr); } } else { if (!PreparingReport) { PayCalcRow.Empty.WriteTo2(dr); } } return("OK"); }