Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int Get_Feature_Ilość_przepracowanych_dni(Context cx) {
- //Variables
- var time = (Soneta.Kadry.Forms.StdParams)cx[typeof(Soneta.Kadry.Forms.StdParams)];
- //Results
- var workDays = Row.DniPracy.Count(x=>x.Data <= time.Okres.To && x.Data >= time.Okres.From);
- foreach (var vacation in Row.Nieobecnosci)
- {
- if(vacation != null && vacation.Definicja.Typ == TypNieobecnosci.NieobecnośćZUS )
- workDays += vacation.Okres.Count(x => x >= time.Okres.From && x <= time.Okres.To);
- }
- //Return
- return workDays;
- }
- // W kodzie możesz używać następujacych zmiennych:
- // Row: Pracownik - Wiersz przeliczanej cechy
- // Table: Pracownicy - Tabela wiersza przeliczanej cechy
- // Module: KadryModule - Moduł, w którym znajduje się tabela
- // Session: Session - Obiekt sesji dający dostęp do wszystkich danych programu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement