public ShowAllAuditSheetController()
 {
     _IProject    = new ProjectConcrete();
     _ITimeSheet  = new TimeSheetConcrete();
     _IAuditSheet = new AuditSheetConcrete();
     _IUsers      = new UsersConcrete();
 }
 public ShowAllTimeSheetController()
 {
     _IMenu      = new MenuImpl();
     _IProject   = new ProjectImpl();
     _ITimeSheet = new TimeSheetImpl();
     _IUsers     = new UsersImpl();
 }
 /// <summary>
 /// records an entry in a specified time sheet
 /// </summary>
 /// <param name="timeSheet">the time sheet</param>
 /// <param name="hours">the number of hours to record</param>
 /// <param name="payRate">payrate enumerated value</param>
 public void RecordTime(ITimeSheet timeSheet, int hours,
     PayRate payRate)
 {
     if (payRate == PayRate.Holiday)
     {
         timeSheet.AddEntry(name, hours * 3);
     }
     else if (payRate == PayRate.Weekend)
     {
         timeSheet.AddEntry(name, hours * 2);
     }
     else
     {
         timeSheet.AddEntry(name, hours);
     }
 }
Esempio n. 4
0
 public TimeSheetController(ApplicationContext context)
 {
     _context   = context;
     _timeSheet = new TimeSheetRepo(_context);
 }
Esempio n. 5
0
 public TimeSheetMasterExportController()
 {
     _ITimeSheetExport = new TimeSheetExportConcrete();
     _ITimeSheet       = new TimeSheetConcrete();
 }
        protected IEnumerable <object> GetEquitiesSheet(long[] systems, TimeInterval timeInterval, EquityType equityType)
        {
            ITimeSheet timeSheet = queryRunner.TimeSheetFactory(systems, timeInterval, equityType);

            return(timeSheet.GetEquitiesSheet());
        }
Esempio n. 7
0
 public UserController()
 {
     _IMenu      = new MenuImpl();
     _ITimeSheet = new TimeSheetImpl();
     _IExpense   = new ExpenseImpl();
 }
 public PersonTimeSheetsController(LawInOrderDBContext context,
                                   ITimeSheet _iTimeSheet)
 {
     this.iTimeSheet = _iTimeSheet;
     _context        = context;
 }
Esempio n. 9
0
 public QualityLeadController()
 {
     _ITimeSheet  = new TimeSheetConcrete();
     _IAuditSheet = new AuditSheetConcrete();
 }
 public TimeSheetController()
 {
     _IProject   = new ProjectConcrete();
     _ITimeSheet = new TimeSheetConcrete();
     _IUsers     = new UsersConcrete();
 }
Esempio n. 11
0
 public ApiController(ITimeSheet service)
 {
     _timeSheetService = service;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AdminController"/> class.
 /// </summary>
 public AdminController()
 {
     _ITimeSheet = new TimeSheetConcrete();
     _IExpense   = new ExpenseConcrete();
 }
Esempio n. 13
0
 public AllTimeSheetController()
 {
     _IMenu      = new MenuImpl();
     _IProject   = new ProjectImpl();
     _ITimeSheet = new TimeSheetImpl();
 }
Esempio n. 14
0
 public WorkingTimeController(ITimeSheet timeSheet)
 {
     _timeSheet = timeSheet;
 }
Esempio n. 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserDashboardController"/> class.
 /// </summary>
 public UserDashboardController()
 {
     _ITimeSheet = new TimeSheetConcrete();
     _IExpense   = new ExpenseConcrete();
 }
Esempio n. 16
0
 public TimeSheetExportController()
 {
     _IMenu            = new MenuImpl();
     _ITimeSheetExport = new TimeSheetExportImpl();
     _ITimeSheet       = new TimeSheetImpl();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AllTimeSheetController"/> class.
 /// </summary>
 public AllTimeSheetController()
 {
     _IProject   = new ProjectConcrete();
     _ITimeSheet = new TimeSheetConcrete();
 }
Esempio n. 18
0
        /// <summary>
        /// This code is based on the code developed by Chris Bayley
        /// </summary>
        public void Example01()
        {
            Console.WriteLine("Running Example01...");

            // Systems we want to see in the chart
            Tuple <long, String, Color>[] systemIds =
            {
                Tuple.Create(110751645L, "Stock Growth",  Color.Red),
                Tuple.Create(125206069L, "Marlin",        Color.LightBlue),
                Tuple.Create(106600099L, "VIXTrader Pro", Color.LightGreen)
            };

            // Set a preliminary Start Date
            DateTime StartDate = DateTime.Parse("1-feb-2008");

            // Find earliest start date common to all systems
            foreach (var id in systemIds)
            {
                DateTime sysStartDate = (from s in C2SYSTEMS
                                         where s.SystemId == id.Item1
                                         select s.Started).First();

                if (DateTime.Compare(sysStartDate, StartDate) > 0)
                {
                    StartDate = sysStartDate;
                }
            }

            // Get the Monthly equity data
            ITimeSheet timeSheet = TimeSheetFactory(systemIds.Select(id => id.Item1), TimeInterval.Month, EquityType.Equity);

            // ===================================================================
            // Here, a developer writes the exactly same code as on the web page.
            // ===================================================================
            // Say - a developer wants to play with timeSheet.
            // IntelliSense in action:
            var Developer_Trying_To_Do_Something = timeSheet.Commissions.CalcCommissions(systemIds[0].Item1);

            TABLE = timeSheet.GetEquitiesSheet();

            //// Create a chart object
            //ITimeSeriesChart chart = new TimeSeriesChart();
            //chart.Name = String.Format("Chris Bayley Chart");

            //// Add data
            //foreach (Tuple<long, String, Color> system in systemIds)
            //{
            //	chart.Add(timeSheet.GetColumn(system.Item1, EquityType.Equity), system.Item2, system.Item3);
            //}

            //// Enjoy!
            //CHART = chart;

            // return the EquitySheet as a Deedle.Frame
            var sparseEquityFrame = timeSheet.DataFrame;

            // Drop the rows from the frame which dont have data for all systems
            var denseEquityFrame = FrameModule.DropSparseRows(sparseEquityFrame);

            // ??? QUESTION 1:
            // Now I have the data I want in denseEquityFrame and I wish to convert it to IEnumerable for display by TABLE=
            IEnumerable <string> rowKeyNames = new string[] { "KeyName" };
            var equityDataTable = denseEquityFrame.ToDataTable(rowKeyNames);
            // Next line yields this error:
            // *** Error: Error CS0266: 139:7 Cannot implicitly convert type 'System.Data.DataTable' to
            // 'System.Collections.Generic.IEnumerable<object>'. An explicit conversion exists (are you missing a cast?)
            // If an explict conversion exits, what is it ??
            //TABLE=equityDataTable;

            // ??? QUESTION 2:
            // return Equity Sheet as IEnumerable to use with TABLE=
            // I can do this but it includes Dates I don't want
            var equityTable = timeSheet.GetEquitiesSheet();

            // So I'd like to do this:
            // equityTable =  timeSheet.GetEquitiesSheet().Where(z => z.Item1 >= StartDate);
            // but that yields:
            // *** Error: Error CS1061: 146:62 'object' does not contain a definition for 'Item1' and no extension method 'Item1'
            // accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
            TABLE = equityTable;


            // ============ LOCAL DEBUGGING IN VISUAL STUDIO ========
            FrameExtensions.Print(denseEquityFrame);
            //FrameExtensions.Print(((Frame<DateTime, string>)equityTable.ElementAt(1)).GetFrameData());
            FrameExtensions.Print <DateTime, string>(timeSheet.DataFrame);

            Console.WriteLine("Example01 done. Press ENTER");
            Console.ReadLine();
        }