Ejemplo n.º 1
0
        public ActionResult Index()
        {
            ReportModel      reportModel = new ReportModel();
            List <Report>    reportList  = new List <Report>();
            TaskTimesheetDAL dal         = new TaskTimesheetDAL();
            string           EmpID       = dal.GetEmployeeIdFromEmployeeCodeSEM(Convert.ToInt32(Membership.GetUser().UserName));
            int employeeID = Convert.ToInt32(EmpID);

            reportList             = reportDAL.GetReportList(employeeID);
            reportModel.reportList = reportList;
            return(View(reportModel));
        }
Ejemplo n.º 2
0
        public ActionResult GetSelectedReportData(string reportID)
        {
            TaskTimesheetDAL dal   = new TaskTimesheetDAL();
            string           EmpID = dal.GetEmployeeIdFromEmployeeCodeSEM(Convert.ToInt32(Membership.GetUser().UserName));
            int employeeID         = Convert.ToInt32(EmpID);

            try
            {
                return(Json(reportDAL.GetReportData(Convert.ToInt32(reportID), employeeID), JsonRequestBehavior.AllowGet));
            }
            catch (Exception)
            {
                return(Json(new { }));
            }
        }
Ejemplo n.º 3
0
 public static string GetEmployeeIdsForPlannedTask(string param, string ControlName, int?Reportid)
 {
     try
     {
         ReportDAL        dal          = new ReportDAL();
         WSEMDBEntities   dbContext    = new WSEMDBEntities();
         string           Employeecode = Membership.GetUser().UserName;
         TaskTimesheetDAL Timesheetdal = new TaskTimesheetDAL();
         int?employeid = Convert.ToInt32(Timesheetdal.GetEmployeeIdFromEmployeeCodeSEM(Convert.ToInt32(Employeecode)));
         return(JsonConvert.SerializeObject(dal.GetDropDownDataIfAvailable(dbContext, "EmployeeListByProjectIDForPlannedTask", employeid, param, Reportid, ControlName)));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }