Migracja z NAS do Gitea
This commit is contained in:
+144
@@ -0,0 +1,144 @@
|
||||
using FX2_SP_WORKERS.UzupelnijPodmiotOperBank;
|
||||
using FX2_SP_WORKERS.ImportRcpCsv;
|
||||
using Soneta.Business;
|
||||
using Soneta.Business.UI;
|
||||
using Soneta.Core;
|
||||
using Soneta.Ksiega;
|
||||
using Soneta.Tools;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Soneta.Kalend;
|
||||
|
||||
//Workery
|
||||
[assembly: Worker(typeof(FX2_SP_WORKERS.PrzeksiegowanieProwizjeButton), typeof(DokEwidencji))]
|
||||
[assembly: Worker(typeof(FX2_SP_WORKERS.PrzeksiegowanieKosztyButton), typeof(DokEwidencji))]
|
||||
//[assembly: Worker(typeof(FX2_SP_WORKERS.UzupelnijPodmiotOperBankButton), typeof(ZapisyKsiegowe))]
|
||||
[assembly: Worker(typeof(FX2_SP_WORKERS.ImportRcpCsvButton), typeof(WejsciaWyjsciaI))]
|
||||
|
||||
namespace FX2_SP_WORKERS
|
||||
{
|
||||
internal class PrzeksiegowanieProwizjeButton
|
||||
{
|
||||
[Context]
|
||||
public Context context { get; set; }
|
||||
|
||||
[Context]
|
||||
public PrzeksięgowanieProwizje.PrzeksiegowanieParams parametry { get; set; }
|
||||
|
||||
[Action(
|
||||
"Przeksięgowanie/Przeksięgowanie Prowizji",
|
||||
Description = "Przeksięgowanie prowizji do dokumentu PK",
|
||||
Priority = 1,
|
||||
IconName = "dokument_kwota",
|
||||
Mode = ActionMode.Progress,
|
||||
Target = ActionTarget.Menu | ActionTarget.ToolbarWithText)]
|
||||
public object PrzeksiegowanieProw()
|
||||
{
|
||||
return PrzeksięgowanieProwizje.PrzeksiegowanieFun.Start(context, parametry);
|
||||
}
|
||||
|
||||
public static bool IsEnabledPrzeksiegowanieProw(Context cx)
|
||||
{
|
||||
return PrzeksięgowanieProwizje.PrzeksiegowanieFun.Enabled(cx);
|
||||
}
|
||||
|
||||
public static bool IsVisiblePrzeksiegowanieProw(Context cx)
|
||||
{
|
||||
return PrzeksięgowanieProwizje.PrzeksiegowanieFun.Visible(cx);
|
||||
}
|
||||
}
|
||||
|
||||
internal class PrzeksiegowanieKosztyButton
|
||||
{
|
||||
[Context]
|
||||
public Context context { get; set; }
|
||||
|
||||
[Context]
|
||||
public PrzeksiegowanieKoszty.PrzeksiegowanieKosztyParams parametry { get; set; }
|
||||
|
||||
[Action(
|
||||
"Przeksięgowanie/Przeksięgowanie Kosztów",
|
||||
Description = "Przeksięgowanie kosztów zakupowych do dokumentu PK",
|
||||
Priority = 1,
|
||||
IconName = "dokument_moneta",
|
||||
Mode = ActionMode.Progress,
|
||||
Target = ActionTarget.Menu | ActionTarget.ToolbarWithText)]
|
||||
public object PrzeksiegowanieKosz()
|
||||
{
|
||||
return PrzeksiegowanieKoszty.PrzeksiegowanieKosztyFun.Start(context, parametry);
|
||||
}
|
||||
|
||||
public static bool IsEnabledPrzeksiegowanieKosz(Context cx)
|
||||
{
|
||||
return PrzeksiegowanieKoszty.PrzeksiegowanieKosztyFun.Enabled(cx);
|
||||
}
|
||||
|
||||
public static bool IsVisiblePrzeksiegowanieKosz(Context cx)
|
||||
{
|
||||
return PrzeksiegowanieKoszty.PrzeksiegowanieKosztyFun.Visible(cx);
|
||||
}
|
||||
}
|
||||
internal class UzupelnijPodmiotOperBankButton
|
||||
{
|
||||
[Context]
|
||||
public Context context { get; set; }
|
||||
[Action(
|
||||
"Uzupelnij Podmiot Operacji Bankowej",
|
||||
Description = "Uzupełnia podmiot operacji bankowej na zapisach księgowych powiązanych z wyciągiem bankowym",
|
||||
Priority = 1,
|
||||
IconName = "dokument_kwota",
|
||||
Mode = ActionMode.Progress,
|
||||
Target = ActionTarget.Menu | ActionTarget.ToolbarWithText)]
|
||||
public object UzupelnijPodmiotOperBank()
|
||||
{
|
||||
return UzupelnijPodmiotOperBankFun.Start(context);
|
||||
}
|
||||
public static bool IsEnabledUzupelnijPodmiotOperBank(Context cx)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsVisibleUzupelnijPodmiotOperBank(Context cx)
|
||||
{
|
||||
return UzupelnijPodmiotOperBankFun.Visible(cx);
|
||||
}
|
||||
}
|
||||
|
||||
internal class ImportRcpCsvButton
|
||||
{
|
||||
[Context]
|
||||
public Context context { get; set; }
|
||||
|
||||
[Context, Required]
|
||||
public ImportRCPParams parametry { get; set; }
|
||||
|
||||
[Action(
|
||||
"Import CSV",
|
||||
Description = "Import danych RCP pracowników z pliku CSV",
|
||||
Priority = 1,
|
||||
IconName = "jodit-upload",
|
||||
Mode = ActionMode.Progress,
|
||||
Target = ActionTarget.Menu | ActionTarget.ToolbarWithText)]
|
||||
public object ImportRcpStart()
|
||||
{
|
||||
NamedStream namedStream = parametry.FileName;
|
||||
StreamReader streamReader = new StreamReader(namedStream.GetStream(), Encoding.UTF8);
|
||||
|
||||
//Pominięcie lini z tytułami kolumn
|
||||
streamReader.ReadLine();
|
||||
TraceInfo.SetProgressBar(0);
|
||||
TraceInfo.WriteProgress("0% Importowanie RCP");
|
||||
|
||||
return ImportRCPFun.Start(context, streamReader);
|
||||
}
|
||||
public static bool IsEnabledImportRcpStart(Context cx)
|
||||
{
|
||||
return ImportRCPFun.Enabled(cx);
|
||||
}
|
||||
public static bool IsVisibleImportRcpStart(Context cx)
|
||||
{
|
||||
return ImportRCPFun.Visible(cx);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user