Example #1
0
        public string DeleteTask(string projectSubTaskId)
        {
            ReportsBusinessActions obj = new ReportsBusinessActions();
            var result = obj.DeleteSubTask(Convert.ToInt32(projectSubTaskId));

            return(string.Empty);
        }
        public string GetAllUserTaskReport(string pageNumber, string projectName, string phaseName, string userId, string fromDate, string toDate, string numberOfrecords)
        {
            ReportsBusinessActions obj = new ReportsBusinessActions();
            var result = obj.GetAllUserTaskReport(pageNumber, projectName, phaseName, userId, fromDate, toDate, numberOfrecords);
            var json   = new JavaScriptSerializer().Serialize(result);

            return(json);
        }
        public string GetAllExpensesReport(string pageNumber, string searchTerm, string category, string fromDate, string toDate, string expenseFor)
        {
            ReportsBusinessActions obj = new ReportsBusinessActions();
            var result = obj.GetAllExpensesReport(pageNumber, searchTerm, category, fromDate, toDate, expenseFor);
            var json   = new JavaScriptSerializer().Serialize(result);

            return(json);
        }
        public string GetTaskExcelReport(string pageNumber, string projectName, string phaseName, string userId, string fromDate, string toDate, string numberOfrecords, string userName)
        {
            ReportsBusinessActions obj = new ReportsBusinessActions();
            var result    = obj.GetUserTaskExcel(Convert.ToString(1), projectName, phaseName, userId, fromDate, toDate, Convert.ToString(10000), userName);
            var directory = HttpContext.Current.Server.MapPath("~/");
            var filename  = Path.Combine(directory, "Download", "UserTasks.xlsx");

            File.WriteAllBytes(filename, result);
            return(new JavaScriptSerializer().Serialize(filename));
        }
        public string GetExpenseExcelReport(string pageNumber, string searchTerm, string category, string fromDate, string toDate, string expenseFor)
        {
            ReportsBusinessActions obj = new ReportsBusinessActions();
            var result    = obj.GetExpenseExcel(pageNumber, searchTerm, category, fromDate, toDate, expenseFor);
            var directory = HttpContext.Current.Server.MapPath("~/");
            var filename  = Path.Combine(directory, "Download", "Expense.xlsx");

            File.WriteAllBytes(filename, result);
            return(new JavaScriptSerializer().Serialize(filename));
        }