Esempio n. 1
0
        public IActionResult LeavesInDetail(string Type, string Year, string Month, string EmployeeCode)
        {
            HttpResponseMessage response = _service.GetResponse(ApiUrl + "/api/Attendances/GetLeavesInDetail/" + Type + "/" + Year + "/" + Month + "/" + EmployeeCode);
            string         stringData    = response.Content.ReadAsStringAsync().Result;
            LeavesInDetail data          = JsonConvert.DeserializeObject <LeavesInDetail>(stringData);

            return(PartialView("LeavesInDetail", data));
        }
Esempio n. 2
0
        public LeavesInDetail GetLeavesInDetail(string Type, string InputOne, string InputTwo, string EmployeeCode)
        {
            //string InputTwo = month.ToString().PadLeft(2, c);=
            LeavesInDetail Model = new LeavesInDetail();

            Model.EmployeeCode = EmployeeCode;
            Person person = _dbContext.Person.Where(x => x.EmployeeCode == EmployeeCode).FirstOrDefault();

            Model.EmployeeName         = person != null ? person.FullName : "";
            Model.sP_GetLeavesInDetail = new List <SP_GetLeavesInDetail>();
            var    SP_SelectType   = new SqlParameter("@SelectType", Type);
            var    SP_InputOne     = new SqlParameter("@InputOne", InputOne);
            var    SP_InputTwo     = new SqlParameter("@InputTwo", InputTwo);
            var    SP_EmployeeCode = new SqlParameter("@EmployeeCode", EmployeeCode);
            var    SP_Flag         = new SqlParameter("@Flag", "All");
            string usp             = "LMS.usp_GetLeavesInDetail @SelectType, @InputOne, @InputTwo, @EmployeeCode,@Flag";

            Model.sP_GetLeavesInDetail = _dbContext._sp_GetLeavesInDetail.FromSql(usp, SP_SelectType, SP_InputOne, SP_InputTwo, SP_EmployeeCode, SP_Flag).ToList();
            return(Model);
        }
Esempio n. 3
0
        public IActionResult GetLeavesInDetail([FromRoute] string Type, [FromRoute] string InputOne, [FromRoute] string InputTwo, [FromRoute] string EmployeeCode)
        {
            LeavesInDetail result = _repository.Attendances.GetLeavesInDetail(Type, InputOne, InputTwo, EmployeeCode);

            return(Ok(result));
        }