public ContentResult Lms(string EmployeeNo, string WD) { LeaveWFCollection collection = T_LMS_Trans_LeaveStoryManager.GetEmployeeLeaveReason(10001, EmployeeNo, WD); return(Content(JsonConvert.SerializeObject(collection), "application/json")); //return View(ViewFolder + "EmpTms.cshtml"); }
public static LeaveWFCollection GetEmployeeLeaveReason(int EntityID, string EmployeeCode, string WorkDate) { LeaveWFCollection items = new LeaveWFCollection(); using (var client = WebApiHelper.myclient(HouseEndpoint, SystemConst.APIJosonReturnValue)) { HttpResponseMessage response = client.GetAsync(string.Format(Resource + "/Get?EntityID={0}&EmployeeCode={1}&WorkDate={2}", EntityID, EmployeeCode, WorkDate)).GetAwaiter().GetResult(); if (response.IsSuccessStatusCode) { items = response.Content.ReadAsAsync <LeaveWFCollection>().GetAwaiter().GetResult(); } } return(items); }
public static LeaveWFCollection GetLeaveReason(LeaveWFPara Filter) { LeaveWFCollection collection = new LeaveWFCollection(); var sqlParams = new SqlParameter[] { new SqlParameter("@EntityID", Filter.EntityID), new SqlParameter("@WorkDate", Filter.WorkDate), new SqlParameter("@EmployeeCode", Filter.EmployeeCode), }; using (var reader = SqlHelper.ExecuteReaderService(ModuleConfig.MyConnection, "MIS_HRApps.dbo.USP_LMS_LeaveInfoDetail_Get", sqlParams)) { LeaveWF obj = new LeaveWF(); while (reader.Read()) { obj = GetItem(reader); collection.Add(obj); } } return(collection); }