Example #1
0
 public EmployeeRTWBatchRunner(SystemService system, IEmployeeService time) : base(system, time)
 {
     ids         = new Dictionary <string, int>();
     BatchStatus = new BatchOperationStatus()
     {
         classId = ClassId.EPRW, processed = 0, tableSize = 0, status = 0
     };
 }
Example #2
0
 public OvertimeBatchRunner(SystemService system, TimeAttendanceService time, EmployeeService emp) : base(system, time)
 {
     employee    = emp;
     ids         = new Dictionary <string, int>();
     BatchStatus = new BatchOperationStatus()
     {
         classId = ClassId.TAOT, processed = 0, tableSize = 0, status = 0
     };
 }
Example #3
0
        public FlatScheduleBatchRunner(ISessionStorage store, ITimeAttendanceService attendance, ISystemService system, IEmployeeService employee) : base(system, attendance)
        {
            this.SessionStore = store;
            SessionHelper h = new SessionHelper(store, new APIKeyBasedTokenGenerator());

            ids = new Dictionary <string, string>();
            this._employeeService = employee;
            BatchStatus           = new BatchOperationStatus()
            {
                classId = ClassId.TAFS, processed = 0, tableSize = 0, status = 0
            };
            errors = new List <FlatSchedule>();
        }
Example #4
0
        public EmployeeNotesBatchRunner(ISessionStorage store, IEmployeeService attendance, ISystemService system, IEmployeeService employee) : base(system, attendance)
        {
            this.SessionStore = store;
            SessionHelper h = new SessionHelper(store, new APIKeyBasedTokenGenerator());

            ids         = new Dictionary <string, string>();
            userids     = new Dictionary <string, string>();
            this.main   = employee;
            BatchStatus = new BatchOperationStatus()
            {
                classId = ClassId.EPNO, processed = 0, tableSize = 0, status = 0
            };
        }
Example #5
0
        public LoansBatchRunner(ISessionStorage store, ISystemService system, ILoanTrackingService main, IEmployeeService employeeService) : base(system, main)
        {
            this.SessionStore = store;
            SessionHelper h = new SessionHelper(store, new APIKeyBasedTokenGenerator());

            ids = new Dictionary <string, string>();
            idc = new Dictionary <string, string>();
            this._employeeService = employeeService;
            BatchStatus           = new BatchOperationStatus()
            {
                classId = ClassId.LTLR, processed = 0, tableSize = 0, status = 0
            };
            errors = new List <Loan>();
        }
Example #6
0
        public PayCodeBatchRunner(ISessionStorage store, ISystemService system, ICompanyStructureService main, IPayrollService payrollService) : base(system, main)
        {
            this.SessionStore = store;
            SessionHelper h = new SessionHelper(store, new APIKeyBasedTokenGenerator());



            BatchStatus = new BatchOperationStatus()
            {
                classId = ClassId.PYPC, processed = 0, tableSize = 0, status = 0
            };
            _payrollService = payrollService;
            payCodes        = new Dictionary <string, string>();
        }
Example #7
0
        public EmploymentHistoryBatchRunner(ISessionStorage store, ISystemService system, IEmployeeService employeeService) : base(system, employeeService)
        {
            _employeeService = employeeService;

            BatchStatus = new BatchOperationStatus()
            {
                classId = ClassId.EPST, processed = 0, tableSize = 0, status = 0
            };
            errors = new List <EmploymentHistory>();


            emps   = new Dictionary <string, int>();
            status = new Dictionary <string, int>();
        }
Example #8
0
        public LeaveBatchRunner(ISessionStorage store, ISystemService system, ILeaveManagementService main, IEmployeeService employeeService) : base(system, main)
        {
            this.SessionStore = store;
            SessionHelper h = new SessionHelper(store, new APIKeyBasedTokenGenerator());


            this._employeeService        = employeeService;
            this._leaveManagementService = main;
            BatchStatus = new BatchOperationStatus()
            {
                classId = ClassId.LMLR, processed = 0, tableSize = 0, status = 0
            };
            ids = new Dictionary <string, string>();
            idL = new Dictionary <string, string>();
        }
Example #9
0
        public DepartmentBatchRunner(ISessionStorage store, ISystemService system, ICompanyStructureService main, IEmployeeService employeeService) : base(system, main)
        {
            this.SessionStore = store;
            SessionHelper h = new SessionHelper(store, new APIKeyBasedTokenGenerator());



            BatchStatus = new BatchOperationStatus()
            {
                classId = ClassId.CSDE, processed = 0, tableSize = 0, status = 0
            };
            _employeeService = employeeService;
            departmentsIds   = new Dictionary <string, string>();
            empIds           = new Dictionary <string, string>();
        }
        protected void DownloadResult(object sender, DirectEventArgs e)
        {
            string attachment = "attachment; filename=MyCsvLol.csv";

            //HttpContext.Current.Response.Clear();
            //HttpContext.Current.Response.ClearHeaders();
            //HttpContext.Current.Response.ClearContent();
            HttpContext.Current.Response.AddHeader("content-disposition", attachment);
            HttpContext.Current.Response.ContentType = "application/octet-stream";
            HttpContext.Current.Response.AddHeader("Pragma", "public");
            string content;

            try
            {
                content = File.ReadAllText(MapPath("~/Imports/" + _systemService.SessionHelper.Get("AccountId") + "/" + ClassId.TAOT.ToString() + ".csv"));
            }

            catch (Exception exp)
            {
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                X.Msg.Alert(Resources.Common.Error, exp.Message).Show();
                return;
            }
            HttpContext.Current.Response.ClearContent();
            HttpContext.Current.Response.Write(content);
            PostRequest <BatchOperationStatus> req = new PostRequest <BatchOperationStatus>();
            BatchOperationStatus batch             = new BatchOperationStatus();

            batch.classId   = ClassId.TAOT;
            batch.status    = 0;
            batch.processed = 0;
            batch.tableSize = 0;
            req.entity      = batch;
            PostResponse <BatchOperationStatus> resp = _systemService.ChildAddOrUpdate <BatchOperationStatus>(req);

            if (!resp.Success)
            {
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                Common.errorMessage(resp);
                return;
            }
            Viewport1.ActiveIndex = 0;
            HttpContext.Current.Response.Flush();

            Response.Close();
        }
Example #11
0
        public EmployeeBatchRunner(ISessionStorage store, IEmployeeService employee, ISystemService system, ITimeAttendanceService timeAttendance) : base(system, employee)
        {
            this.timeAttendance = timeAttendance;
            this.SessionStore   = store;
            SessionHelper h = new SessionHelper(store, new APIKeyBasedTokenGenerator());


            BatchStatus = new BatchOperationStatus()
            {
                classId = ClassId.EPEM, processed = 0, tableSize = 0, status = 0
            };
            errors        = new List <Employee>();
            caId          = new Dictionary <string, int>();
            nationalityId = new Dictionary <string, int>();
            //FillCaId();
            FillNationalityId();
        }
        protected void Unnamed_Event(object sender, DirectEventArgs e)
        {
            PostRequest <BatchOperationStatus> req = new PostRequest <BatchOperationStatus>();
            BatchOperationStatus batch             = new BatchOperationStatus();

            batch.classId   = ClassId.EPJI;
            batch.status    = 0;
            batch.processed = 0;
            batch.tableSize = 0;
            req.entity      = batch;
            PostResponse <BatchOperationStatus> resp = _systemService.ChildAddOrUpdate <BatchOperationStatus>(req);

            if (!resp.Success)
            {
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                Common.errorMessage(resp);
                return;
            }
        }
Example #13
0
        protected void Unnamed_Event(object sender, DirectEventArgs e)
        {
            PostRequest <BatchOperationStatus> req = new PostRequest <BatchOperationStatus>();
            BatchOperationStatus batch             = new BatchOperationStatus();

            batch.classId   = ClassId.CSDE;
            batch.status    = 0;
            batch.processed = 0;
            batch.tableSize = 0;
            req.entity      = batch;
            PostResponse <BatchOperationStatus> resp = _systemService.ChildAddOrUpdate <BatchOperationStatus>(req);

            if (!resp.Success)
            {
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                X.Msg.Alert(Resources.Common.Error, GetGlobalResourceObject("Errors", resp.ErrorCode) != null ? GetGlobalResourceObject("Errors", resp.ErrorCode).ToString() + "<br>" + GetGlobalResourceObject("Errors", "ErrorLogId") + resp.LogId : resp.Summary).Show();
                return;
            }
        }
Example #14
0
        public SalaryBatchRunner(ISessionStorage store, IEmployeeService employee, ISystemService system, IEmployeeService _employeeService) : base(system, employee)
        {
            this._employeeService = _employeeService;
            empRef     = new Dictionary <string, int>();
            ents       = new Dictionary <string, int>();
            deds       = new Dictionary <string, int>();
            currencyId = new Dictionary <string, int>();
            scrId      = new Dictionary <string, string>();
            FillEDS();
            fillcurrency();
            fillscrId();
            //   this.SessionStore = store;
            //   SessionHelper h = new SessionHelper(store, new APIKeyBasedTokenGenerator());


            BatchStatus = new BatchOperationStatus()
            {
                classId = ClassId.EPSA, processed = 0, tableSize = 0, status = 0
            };
            errors = new List <SalaryTree>();
        }
Example #15
0
        public PunchesBatchRunner(ISessionStorage store, IEmployeeService employee, ISystemService system, ITimeAttendanceService timeAttendance, string UnknownError) : base(system, employee)
        {
            this.timeAttendance = timeAttendance;
            this.UnknownError   = UnknownError;
            this.employee       = employee;
            this.SessionStore   = store;
            SessionHelper h = new SessionHelper(store, new APIKeyBasedTokenGenerator());


            BatchStatus = new BatchOperationStatus()
            {
                classId = ClassId.TAIM, processed = 0, tableSize = 0, status = 0
            };
            errors = new List <Check>();
            udId   = new Dictionary <string, int>();

            //this.InactivePref = InactivePref;
            //this.NameFormat = NameFormat;
            FillUdId();

            //FillCaId();
        }