public object getAttendanceDetails(GetAttendanceDetails_Input Input) { dynamic TBAttendanceDetailsResult; List <object> AttendanceDetailsResult = new List <object>(); try { List <GetAttendanceDetails> Result = Attendance.getAttendanceDetails(Input); for (int i = 0; i < Result.Count; i++) { AttendanceDetailsResult.Add(new { AttendanceResult = Result[i] }); } if (AttendanceDetailsResult != null) { TBAttendanceDetailsResult = new { status = "0", message = "success", AttendanceDetailsResult }; } else { TBAttendanceDetailsResult = new { status = "0", message = "Record not found" }; } } catch { TBAttendanceDetailsResult = new { status = "1", message = "failed" }; } return(new { TBAttendanceDetailsResult }); }
//Created By Mukesh A. Dhole public static List <GetAttendanceDetails> getAttendanceDetails(GetAttendanceDetails_Input Input) { try { MySqlParameter[] param = new MySqlParameter[1]; param[0] = new MySqlParameter("?p_AttendanceID", Input.AttendanceID); var Result = _DbTouchbase.ExecuteStoreQuery <GetAttendanceDetails>("CALL USP_API_Mobile_getAttendanceDetails(?p_AttendanceID)", param).ToList(); return(Result); } catch (Exception ex) { throw ex; } }
public static int getAttendanceDelete(GetAttendanceDetails_Input Input) { int result = 0; try { MySqlParameter[] param = new MySqlParameter[2]; param[0] = new MySqlParameter("?p_AttendanceID", Input.AttendanceID); param[1] = new MySqlParameter("?p_CreatedBy", Input.createdBy); result = MySqlHelper.ExecuteNonQuery(GlobalVar.strAppConn, CommandType.StoredProcedure, "USP_API_Mobile_AttendanceDelete", param); } catch (Exception ex) { throw ex; } return(result); }
//Created By Mukesh A. Dhole public static List <GetAttendanceDetails> getAttendanceDetails(GetAttendanceDetails_Input Input) { try { MySqlParameter[] param = new MySqlParameter[1]; param[0] = new MySqlParameter("?p_AttendanceID", Input.AttendanceID); using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities()) { context.Connection.Open(); var Result = context.ExecuteStoreQuery <GetAttendanceDetails>("CALL USP_API_Mobile_getAttendanceDetails(?p_AttendanceID)", param).ToList(); return(Result); } } catch (Exception ex) { throw ex; } }
public object AttendanceDelete(GetAttendanceDetails_Input Input) { dynamic TBAttendanceDetailsResult = null; try { int Result = Attendance.getAttendanceDelete(Input); if (Result != 0) { TBAttendanceDetailsResult = new { status = "0", message = "success" }; } else { TBAttendanceDetailsResult = new { status = "1", message = "failed" }; } } catch { TBAttendanceDetailsResult = new { status = "1", message = "failed" }; } return(TBAttendanceDetailsResult); }
public object getAttendanceDistrictDeleagateDetails(GetAttendanceDetails_Input Input) { dynamic TBAttendanceDistrictDeleagateDetailsResult; try { List <newDistrictDelegate> AttendanceDistrictDeleagateResult = Attendance.getAttendanceDistrictDeleagateDetails(Input); if (AttendanceDistrictDeleagateResult.Count != 0) { TBAttendanceDistrictDeleagateDetailsResult = new { status = "0", message = "success", AttendanceDistrictDeleagateResult }; } else { TBAttendanceDistrictDeleagateDetailsResult = new { status = "0", message = "Record not found" }; } } catch { TBAttendanceDistrictDeleagateDetailsResult = new { status = "1", message = "failed" }; } return(new { TBAttendanceDistrictDeleagateDetailsResult }); }
public static List <newDistrictDelegate> getAttendanceDistrictDeleagateDetails(GetAttendanceDetails_Input Input) { try { MySqlParameter[] param = new MySqlParameter[2]; param[0] = new MySqlParameter("?p_AttendanceID", Input.AttendanceID); param[1] = new MySqlParameter("?p_Type", Input.type); var Result = _DbTouchbase.ExecuteStoreQuery <newDistrictDelegate>("CALL USP_API_Mobile_AttendanceTypeDetails(?p_AttendanceID,?p_Type)", param).ToList(); return(Result); } catch (Exception ex) { throw ex; } }