Exemplo n.º 1
0
      public ActionResult PromotionDetails(int?Id)
      {
          IStructuredetailRepository repo = new StructuredetailRepository();

          var Data = (from emp in repo.Getemp()
                      join empdet in repo.Getempdet() on emp.EmployeeId equals empdet.EmployeeId
                      join pos in repo.Getpos() on emp.PositionId equals pos.Id
                      select new
            {
                emp.EmployeeId,
                emp.EmployeeName,
                emp.PositionId,
                pos.Position,
                empdet.EmployeeSalary,
                empdet.DateofPromotion
            }).Where(x => x.EmployeeId == Id).Select(c => new PositionVM()
            {
                EmployeeName    = c.EmployeeName,
                EmployeeId      = (int)c.EmployeeId,
                Position        = c.Position,
                Employeesalary  = (decimal)c.EmployeeSalary,
                DateofPromotion = (DateTime)c.DateofPromotion
            }).FirstOrDefault();



          return(View(Data));
      }
Exemplo n.º 2
0
      public ActionResult GetPromotedEmployeesList()
      {
          IStructuredetailRepository repo = new StructuredetailRepository();

          var Data = (from emp in repo.Getemp()
                      join empdetail in repo.Getempdet() on emp.EmployeeId equals empdetail.EmployeeId
                      join pos in repo.Getpos() on emp.PositionId equals pos.Id
                      select new
            {
                emp.EmployeeId,
                emp.EmployeeName,
                empdetail.DateofPromotion,
                empdetail.IsSalaryset,
                pos.Position,
                pos.BasicPay
            }).Where(a => a.IsSalaryset == false).ToList();

          return(Json(new { data = Data }, JsonRequestBehavior.AllowGet));
      }