//AddReview public bool AddReview(string UserId, string CourseCode, string Comments, DateTime CommentedOn) { bool res = false; try { using (var context = new UserDBContext()) { var userid = new SqlParameter("@UserId", string.IsNullOrEmpty(UserId) ? DBNull.Value : (object)UserId); var coursecode = new SqlParameter("@CourseCode", string.IsNullOrEmpty(CourseCode) ? DBNull.Value : (object)CourseCode); var comment = new SqlParameter("@Comments", string.IsNullOrEmpty(Comments) ? DBNull.Value : (object)Comments); var commentedOn = new SqlParameter("@CommentedOn", CommentedOn); int i = context.Database.ExecuteSqlCommand("SP_AddReview @UserId, @CourseCode, @Comments, @CommentedOn", userid, coursecode, comment, commentedOn); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { } return(res); }
public bool AddCourseTopic(Int64 CourseTopicId, string TopicId, string CourseCode, int TopicSortOrder, bool TopicType, string UserId) { bool res = false; try { using (var context = new UserDBContext()) { var coursetopicid = new SqlParameter("@CourseTopicId", CourseTopicId); var topicid = new SqlParameter("@TopicId", string.IsNullOrEmpty(TopicId) ? DBNull.Value : (object)TopicId); var coursecode = new SqlParameter("@CourseCode", string.IsNullOrEmpty(CourseCode) ? DBNull.Value : (object)CourseCode); var topicsortorder = new SqlParameter("@TopicSortOrder", TopicSortOrder); var topictype = new SqlParameter("@TopicType", TopicType); var userId = new SqlParameter("@UserId", string.IsNullOrEmpty(UserId) ? DBNull.Value : (object)UserId); int i = context.Database.ExecuteSqlCommand("USP_AddCourseTopic @CourseTopicId, @TopicId, @CourseCode, @TopicSortOrder, @TopicType, @UserId", coursetopicid, topicid, coursecode, topicsortorder, topictype, userId); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { //Log the error (uncomment dex variable name and add a line here to write a log. //ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists, see your system administrator."); } return(res); }
public bool AddTrainer(Int64 TrainerAssignId, string BranchCode, string TrainerId, DateTime?DateOfJoining, DateTime?LeavingDate) { bool res = false; try { using (var context = new UserDBContext()) { var trainerAssignId = new SqlParameter("@TrainerAssignId", TrainerAssignId); var branchCode = new SqlParameter("@BranchCode", string.IsNullOrEmpty(BranchCode) ? DBNull.Value : (object)BranchCode); var trainerId = new SqlParameter("@TrainerId", string.IsNullOrEmpty(TrainerId) ? DBNull.Value : (object)TrainerId); var dateOfJoining = new SqlParameter("@DateOfJoining", DateOfJoining); var leavingDate = new SqlParameter("@LeavingDate", string.IsNullOrEmpty(LeavingDate.ToString()) ? DBNull.Value : (object)LeavingDate); int i = context.Database.ExecuteSqlCommand("USP_AddAssignTrainer @TrainerAssignId, @BranchCode, @TrainerId, @DateOfJoining, @LeavingDate", trainerAssignId, branchCode, trainerId, dateOfJoining, leavingDate); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { //Log the error (uncomment dex variable name and add a line here to write a log. //ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists, see your system administrator."); } return(res); }
public bool InsertStudentAttendence(string TrainingId, string UserID, DateTime AttendenceDate, bool IsPresent, string Remarks) { bool res = false; try { using (var context = new UserDBContext()) { var trainingId = new SqlParameter("@TrainingId", string.IsNullOrEmpty(TrainingId) ? DBNull.Value : (object)TrainingId); var userID = new SqlParameter("@UserID", string.IsNullOrEmpty(UserID) ? DBNull.Value : (object)UserID); var attendenceDate = new SqlParameter("@attendenceDate", AttendenceDate); var isPresent = new SqlParameter("@IsPresent", IsPresent); var remarks = new SqlParameter("@Remarks", string.IsNullOrEmpty(Remarks) ? DBNull.Value : (object)Remarks); int i = context.Database.ExecuteSqlCommand("USP_AddCandidateAttendances @TrainingId,@UserId,@AttendenceDate,@IsPresent,@Remarks ", trainingId, userID, attendenceDate, isPresent, remarks); if (i == 1) { res = true; } } } catch (Exception ex) { throw ex; } return(res); }
public bool AddBranch(string BranchCode, string BranchName, string BranchZone, string CorporateId, string SubcriberId) { bool res = false; try { using (var context = new UserDBContext()) { var branchCode = new SqlParameter("@BranchCode", string.IsNullOrEmpty(BranchCode) ? DBNull.Value : (object)BranchCode); var branchName = new SqlParameter("@BranchName", string.IsNullOrEmpty(BranchName) ? DBNull.Value : (object)BranchName); var branchZone = new SqlParameter("@BranchZone", string.IsNullOrEmpty(BranchZone) ? DBNull.Value : (object)BranchZone); var corporateId = new SqlParameter("@CorporateId", string.IsNullOrEmpty(CorporateId) ? DBNull.Value : (object)CorporateId); var subscriberId = new SqlParameter("@SubcriberId", string.IsNullOrEmpty(SubcriberId) ? DBNull.Value : (object)SubcriberId); int i = context.Database.ExecuteSqlCommand("USP_AddBranchDetails @BranchCode, @BranchName, @BranchZone, @CorporateId, @SubcriberId", branchCode, branchName, branchZone, corporateId, subscriberId); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { //Log the error (uncomment dex variable name and add a line here to write a log. //ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists, see your system administrator."); } return(res); }
public bool AddTopicLecture(Int64 TopicLectureId, string LectureId, string TopicId, int SortOrder, bool LectureType, string SubscriberId) { bool res = false; try { using (var context = new UserDBContext()) { var topiclectureid = new SqlParameter("@TopicLectureId", TopicLectureId); var lectureid = new SqlParameter("@LectureId", string.IsNullOrEmpty(LectureId) ? DBNull.Value : (object)LectureId); var topicid = new SqlParameter("@TopicId", string.IsNullOrEmpty(TopicId) ? DBNull.Value : (object)TopicId); var sortorder = new SqlParameter("@SortOrder", SortOrder); var lecturetype = new SqlParameter("@LectureType", LectureType); var subscriberId = new SqlParameter("@SubscriberId", string.IsNullOrEmpty(SubscriberId) ? DBNull.Value : (object)SubscriberId); int i = context.Database.ExecuteSqlCommand("USP_AddTopicLecture @TopicLectureId, @LectureId, @TopicId, @SortOrder, @LectureType, @SubscriberId", topiclectureid, lectureid, topicid, sortorder, lecturetype, subscriberId); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { //Log the error (uncomment dex variable name and add a line here to write a log. //ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists, see your system administrator."); } return(res); }
public string CInCOutInBulk(Int64 BatchId, string UserId, DateTime CheckInDate, DateTime?CheckOutDate, string UpdatedBy) { string res = "Failed:"; try { using (var context = new UserDBContext()) { var batchId = new SqlParameter("@BatchId", BatchId); var userId = new SqlParameter("@UserId", string.IsNullOrEmpty(UserId) ? DBNull.Value : (object)UserId); var checkInDate = new SqlParameter("@CheckInDate", CheckInDate); var checkOutDate = new SqlParameter("@CheckOutDate", CheckOutDate == null ? DBNull.Value : (object)CheckOutDate); var updatedBy = new SqlParameter("@UpdatedBy", string.IsNullOrEmpty(UpdatedBy) ? DBNull.Value : (object)UpdatedBy); var updatedOn = new SqlParameter("@UpdatedOn", DateTime.UtcNow); int i = context.Database.ExecuteSqlCommand("USP_UpdateCInCOutOfCandidate @BatchId,@UserId,@CheckInDate,@CheckOutDate,@UpdatedBy,@UpdatedOn" , batchId, userId, checkInDate, checkOutDate, updatedBy, updatedOn); if (i == 1) { res = "Succeed:Data saved successfully"; } } } catch (Exception ex) { res = res + ex.ToString(); } return(res); }
//method for add User Androied Device Information //Created By: Vikas Pandey //Created On : 18/08/2018 public bool AddDeviceInfromation(string UserId, string AndroidId, string DeviceName) { bool res = false; try { using (var context = new UserDBContext()) { var userid = new SqlParameter("@UserId", string.IsNullOrEmpty(UserId) ? DBNull.Value : (object)UserId); var androidId = new SqlParameter("@AndroidId", string.IsNullOrEmpty(AndroidId) ? DBNull.Value : (object)AndroidId); var deviceName = new SqlParameter("@DeviceName", string.IsNullOrEmpty(AndroidId) ? DBNull.Value : (object)DeviceName); int i = context.Database.ExecuteSqlCommand("USP_UserDeviceInformation @UserId,@AndroidId, @DeviceName" , userid, androidId, deviceName); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { } return(res); }
public bool AddCandidateAttendances(Int64 AttendenceId, string TrainingId, string UserId, DateTime?AttendenceDate, string IsPresent, string Remarks, string Sessions) { bool res = false; try { using (var context = new UserDBContext()) { var attendenceId = new SqlParameter("@AttendenceId", AttendenceId); var trainingId = new SqlParameter("@TrainingId", string.IsNullOrEmpty(TrainingId) ? DBNull.Value : (object)TrainingId); var userId = new SqlParameter("@UserId", string.IsNullOrEmpty(UserId) ? DBNull.Value : (object)UserId); var attendancedate = new SqlParameter("@AttendenceDate", AttendenceDate ?? (object)DBNull.Value); var ispresent = new SqlParameter("@IsPresent", string.IsNullOrEmpty(IsPresent) ? DBNull.Value : (object)IsPresent); var remarks = new SqlParameter("@Remarks", string.IsNullOrEmpty(Remarks) ? DBNull.Value : (object)Remarks); var sessions = new SqlParameter("@Sessions", string.IsNullOrEmpty(Sessions) ? DBNull.Value : (object)Sessions); int i = context.Database.ExecuteSqlCommand("USP_AddCandidateAttendances @AttendenceId, @TrainingId ,@UserId ,@AttendenceDate ,@IsPresent, @Remarks, @Sessions", attendenceId, trainingId, userId, attendancedate, ispresent, remarks, sessions); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { } return(res); }
//Add Reply public bool AddReply(Int64 CommentId, string Reply, string UserId, DateTime RepliedOn) { bool res = false; try { using (var context = new UserDBContext()) { var commentid = new SqlParameter("@CommentId", CommentId); var reply = new SqlParameter("@Reply", string.IsNullOrEmpty(Reply) ? DBNull.Value : (object)Reply); var repliedOn = new SqlParameter("@RepliedOn", RepliedOn); var userid = new SqlParameter("@UserId", string.IsNullOrEmpty(UserId) ? DBNull.Value : (object)UserId); int i = context.Database.ExecuteSqlCommand("SP_AddReviewReply @CommentId, @Reply, @RepliedOn, @UserId", commentid, reply, repliedOn, userid); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { } return(res); }
public bool UpdateDocument(Int64 FileId, string LectureId, string FileName, string ContentType) { bool res = false; try { using (var context = new UserDBContext()) { var fileId = new SqlParameter("@FileId", FileId); var lectureid = new SqlParameter("@LectureId", string.IsNullOrEmpty(LectureId) ? DBNull.Value : (object)LectureId); var fileName = new SqlParameter("@FileName", string.IsNullOrEmpty(FileName) ? DBNull.Value : (object)FileName); var contentType = new SqlParameter("@ContentType", string.IsNullOrEmpty(ContentType) ? DBNull.Value : (object)ContentType); int i = context.Database.ExecuteSqlCommand("USP_UpdateContent @FileId, @LectureId, @FileName, @ContentType", fileId, lectureid, fileName, contentType); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { //Log the error (uncomment dex variable name and add a line here to write a log. //ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists, see your system administrator."); } return(res); }
public bool AddLectureMaster(string LectureId, string LectureName, string LectureDescription, string Keywords, bool Permission, int LectureStatus, int Weightage, bool IsDelete, string SubscriberId) { bool res = false; try { using (var context = new UserDBContext()) { var lectureid = new SqlParameter("@LectureId", string.IsNullOrEmpty(LectureId) ? DBNull.Value : (object)LectureId); var lecturename = new SqlParameter("@LectureName", string.IsNullOrEmpty(LectureName) ? DBNull.Value : (object)LectureName); var lecturedescription = new SqlParameter("@LectureDescription", string.IsNullOrEmpty(LectureDescription) ? DBNull.Value : (object)LectureDescription); var keywords = new SqlParameter("@Keywords", string.IsNullOrEmpty(Keywords) ? DBNull.Value : (object)Keywords); var permission = new SqlParameter("@Permission", Permission); var lecturestatus = new SqlParameter("@LectureStatus", LectureStatus); var weightage = new SqlParameter("@Weightage", Weightage); var isdelete = new SqlParameter("@IsDelete", IsDelete); var subscriberId = new SqlParameter("@SubscriberId", string.IsNullOrEmpty(SubscriberId) ? DBNull.Value : (object)SubscriberId); int i = context.Database.ExecuteSqlCommand("USP_AddLectureMaster @LectureId, @LectureName, @LectureDescription, @Keywords, @Permission, @LectureStatus, @Weightage, @IsDelete, @SubscriberId", lectureid, lecturename, lecturedescription, keywords, permission, lecturestatus, weightage, isdelete, subscriberId); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { //Log the error (uncomment dex variable name and add a line here to write a log. //ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists, see your system administrator."); } return(res); }
public bool AddFeedback(Int64 FeedbackId, Int64 TrainerAssignId, Int64 QuestionId, string GapObserved, string SuggestiveMeasures, string Frequency, DateTime FeedBackdate, DateTime UpdatedOn, string SubcriberId) { bool res = false; try { using (var context = new UserDBContext()) { var feedbackId = new SqlParameter("@FeedbackId", FeedbackId); var trainerAssignId = new SqlParameter("@TrainerAssignId", TrainerAssignId); var question = new SqlParameter("@QuestionId", QuestionId); var gapObserved = new SqlParameter("@GapObserved", string.IsNullOrEmpty(GapObserved) ? DBNull.Value : (object)GapObserved); var suggestiveMeasures = new SqlParameter("@SuggestiveMeasures", string.IsNullOrEmpty(SuggestiveMeasures) ? DBNull.Value : (object)SuggestiveMeasures); var frequency = new SqlParameter("@Frequency", string.IsNullOrEmpty(Frequency) ? DBNull.Value : (object)Frequency); var feedBackdate = new SqlParameter("@FeedBackdate", FeedBackdate); var updatedOn = new SqlParameter("@UpdatedOn", UpdatedOn); var subcriberId = new SqlParameter("@SubcriberId", string.IsNullOrEmpty(SubcriberId) ? DBNull.Value : (object)SubcriberId); int i = context.Database.ExecuteSqlCommand("USP_AddFeedBack @FeedbackId, @TrainerAssignId, @QuestionId, @GapObserved, @SuggestiveMeasures, @Frequency, @FeedBackdate, @UpdatedOn, @SubcriberId", feedbackId, trainerAssignId, question, gapObserved, suggestiveMeasures, frequency, feedBackdate, updatedOn, subcriberId); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { //Log the error (uncomment dex variable name and add a line here to write a log. //ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists, see your system administrator."); } return(res); }
public bool FreezeSalary(string SubscriberId, string DepartmentId, string UserId, Int16 PayoutMonth, string UpdatedBy, Int32 PayoutYear) { bool res = false; try { using (var context = new UserDBContext()) { var subscriberId = new SqlParameter("@SubscriberId", string.IsNullOrEmpty(SubscriberId) ? DBNull.Value : (object)SubscriberId); var departmentId = new SqlParameter("@DepartmentId", string.IsNullOrEmpty(DepartmentId) ? DBNull.Value : (object)DepartmentId); var userid = new SqlParameter("@UserId", string.IsNullOrEmpty(UserId) ? DBNull.Value : (object)UserId); var updatedBy = new SqlParameter("@UpdatedBy", string.IsNullOrEmpty(UpdatedBy) ? DBNull.Value : (object)UpdatedBy); var payoutMonth = new SqlParameter("@PayoutMonth", PayoutMonth); var payoutYear = new SqlParameter("@PayoutYear", PayoutYear); int i = context.Database.ExecuteSqlCommand("USP_FreezeProceessedSalary @SubscriberId, @DepartmentId,@UserId,@UpdatedBy, @PayoutMonth, @PayoutYear" , subscriberId, departmentId, userid, updatedBy, payoutMonth, payoutYear); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { } return(res); }
public bool AddQuestions(Int64 QuestionId, string Question, string Category, string SubscriberId) { bool res = false; try { using (var context = new UserDBContext()) { var questionId = new SqlParameter("@QuestionId", QuestionId); var question = new SqlParameter("@Question", string.IsNullOrEmpty(Question) ? DBNull.Value : (object)Question); var category = new SqlParameter("@Category", string.IsNullOrEmpty(Category) ? DBNull.Value : (object)Category); var subscriberId = new SqlParameter("@SubscriberId", string.IsNullOrEmpty(SubscriberId) ? DBNull.Value : (object)SubscriberId); int i = context.Database.ExecuteSqlCommand("USP_AddQuestions @QuestionId, @Question, @Category, @SubscriberId", questionId, question, category, subscriberId); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { //Log the error (uncomment dex variable name and add a line here to write a log. //ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists, see your system administrator."); } return(res); }
//public bool IsUserExists(string MobileNo, string emailAddress) //{ // bool res = false; // try // { // using (var context = new UserDBContext()) // { // var totalCount = context..Where(c=> c.).UserHistory Where(c => c. ).CandidateAttendance.Where(c => c.TrainingId == TrainingId && c.UserId == UserID && c.AttendenceDate == AttendenceDate).Count(); // if (Convert.ToInt32(totalCount) > 0) // res = true; // } // } // catch (Exception ex) // { // throw ex; // } // return res; //} public bool InsertBulkUser(string ID, string SubscriberID, string PhoneNumber, string Email, string Role, string Name, string DepartmentName) { bool res = false; try { using (var context = new UserDBContext()) { var id = new SqlParameter("@ID", string.IsNullOrEmpty(ID) ? DBNull.Value : (object)ID); var subscriberId = new SqlParameter("@SubscriberID", string.IsNullOrEmpty(SubscriberID) ? DBNull.Value : (object)SubscriberID); var phoneNumber = new SqlParameter("@PhoneNumber", string.IsNullOrEmpty(PhoneNumber) ? DBNull.Value : (object)PhoneNumber); var email = new SqlParameter("@Email", string.IsNullOrEmpty(Email) ? DBNull.Value : (object)Email); var role = new SqlParameter("@Role", string.IsNullOrEmpty(Role) ? DBNull.Value : (object)Role); var name = new SqlParameter("@Name", string.IsNullOrEmpty(Name) ? DBNull.Value : (object)Name); var departmentname = new SqlParameter("@DepartmentName", string.IsNullOrEmpty(DepartmentName) ? DBNull.Value : (object)DepartmentName); int i = context.Database.ExecuteSqlCommand("USP_BulkUserRegister @ID,@SubscriberID,@PhoneNumber,@Email,@Role,@Name,@DepartmentName", id, subscriberId, phoneNumber, email, role, name, departmentname); if (i != 0) { res = true; } } } catch (Exception ex) { throw ex; } return(res); }
public bool AddTopicMaster(string TopicId, string TopicName, string TopicDescription, string SubscriberId) { bool res = false; try { using (var context = new UserDBContext()) { var topicid = new SqlParameter("@TopicId", string.IsNullOrEmpty(TopicId) ? DBNull.Value : (object)TopicId); var topicname = new SqlParameter("@TopicName", string.IsNullOrEmpty(TopicName) ? DBNull.Value : (object)TopicName); var topicdescription = new SqlParameter("@TopicDescription", string.IsNullOrEmpty(TopicDescription) ? DBNull.Value : (object)TopicDescription); var subscriberId = new SqlParameter("@SubscriberId", string.IsNullOrEmpty(SubscriberId) ? DBNull.Value : (object)SubscriberId); int i = context.Database.ExecuteSqlCommand("USP_AddTopicMaster @TopicId, @TopicName, @TopicDescription, @SubscriberId", topicid, topicname, topicdescription, subscriberId); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { //Log the error (uncomment dex variable name and add a line here to write a log. //ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists, see your system administrator."); } return(res); }
public bool DeleteDocument(Int64 FileId) { bool res = false; try { var file = udbc.LectureContentUpload.Find(FileId); if (file.FileName != null) { blobManager.DeleteBlob(file.LectureId, GetFileName(FileId)); } using (var context = new UserDBContext()) { var fileId = new SqlParameter("@FileId", FileId); int i = context.Database.ExecuteSqlCommand("USP_DeleteContent @FileId", fileId); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { //Log the error (uncomment dex variable name and add a line here to write a log. //ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists, see your system administrator."); } return(res); }
//For CheckOut public bool AddCheckOut(string UserId, DateTime?CheckOutDate, Int64 BatchId, string UpdatedBy, DateTime UpdatedOn) { bool res = false; try { using (var context = new UserDBContext()) { var userid = new SqlParameter("@UserId", string.IsNullOrEmpty(UserId) ? DBNull.Value : (object)UserId); var checkoutdate = new SqlParameter("@CheckOutDate", CheckOutDate); var batchId = new SqlParameter("@BatchId", BatchId); var updatedBy = new SqlParameter("@UpdatedBy", string.IsNullOrEmpty(UpdatedBy) ? DBNull.Value : (object)UpdatedBy); var updatedOn = new SqlParameter("@UpdatedOn", UpdatedOn); int i = context.Database.ExecuteSqlCommand("USP_AddCandidateCheckOut @UserId,@CheckOutDate, @BatchId, @UpdatedBy, @UpdatedOn", userid, checkoutdate, batchId, updatedBy, updatedOn); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { } return(res); }
public bool AddTrainerComments(string TrainingId, DateTime?CommentDate, string Comment) { bool res = false; try { using (var context = new UserDBContext()) { var trainingId = new SqlParameter("@TrainingId", string.IsNullOrEmpty(TrainingId) ? DBNull.Value : (object)TrainingId); var commentDate = new SqlParameter("@CommentDate", CommentDate); var comment = new SqlParameter("@Comment", Comment); int i = context.Database.ExecuteSqlCommand("USP_AddTrainerComments @TrainingId ,@CommentDate, @Comment", trainingId, commentDate, comment); if (i == 1) { res = true; } } } catch (RetryLimitExceededException /* dex */) { } return(res); }
public List <BranchDetailsView> GetBranchCode() { var branchcode = new List <BranchDetailsView>(); using (var db = new UserDBContext()) { branchcode = db.Database .SqlQuery <BranchDetailsView>("exec USP_GETBranchCode").ToList(); } return(branchcode); }
public List <TrainerAssignView> GetEmployee() { var employee = new List <TrainerAssignView>(); using (var db = new UserDBContext()) { employee = db.Database .SqlQuery <TrainerAssignView>("exec USP_GETEmployee").ToList(); } return(employee); }
public List <ReviewReplyView> GetReviewReply() { var details = new List <ReviewReplyView>(); using (var db = new UserDBContext()) { details = db.Database .SqlQuery <ReviewReplyView>("exec SP_GetReviewReply").ToList(); } return(details); }
public List <BranchDetailsView> GetBranch(string BranchCode = null) { var branch = new List <BranchDetailsView>(); using (var db = new UserDBContext()) { branch = db.Database .SqlQuery <BranchDetailsView>("exec USP_GETBranchDetails @BranchCode", new SqlParameter("@BranchCode", string.IsNullOrEmpty(BranchCode) ? DBNull.Value : (object)BranchCode)).ToList(); } return(branch); }
//GetReview public List <DiscussionForumView> GetReview(string CourseCode) { var details = new List <DiscussionForumView>(); using (var db = new UserDBContext()) { details = db.Database .SqlQuery <DiscussionForumView>("exec SP_GetReview @CourseCode", new SqlParameter("@CourseCode", string.IsNullOrEmpty(CourseCode) ? DBNull.Value : (object)CourseCode)).ToList(); } return(details); }
public List <BranchDetailsView> GetBranchDetails(string SubcriberId = null) { var branchdetails = new List <BranchDetailsView>(); using (var db = new UserDBContext()) { branchdetails = db.Database .SqlQuery <BranchDetailsView>("exec USP_GETBranchDetailsBySubscriber @SubcriberId", new SqlParameter("@SubcriberId", string.IsNullOrEmpty(SubcriberId) ? DBNull.Value : (object)SubcriberId)).ToList(); } return(branchdetails); }
//list for comment public List <TrainerComments> GetTrainerComments(string TrainerId) { var trainercomment = new List <TrainerComments>(); using (var db = new UserDBContext()) { trainercomment = db.Database.SqlQuery <TrainerComments>("EXEC USP_GetTrainerComments @TrainerId", new SqlParameter("TrainerId", string.IsNullOrEmpty(TrainerId) ? DBNull.Value : (object)TrainerId) ).ToList(); } return(trainercomment); }
public List <CandidateAttendanceView> GetCandidateAttendancelist(string TrainingId) { var studentattendance = new List <CandidateAttendanceView>(); using (var db = new UserDBContext()) { studentattendance = db.Database.SqlQuery <CandidateAttendanceView>("EXEC USP_GetCandidateAttendances @TrainingId", new SqlParameter("@TrainingId", string.IsNullOrEmpty(TrainingId) ? DBNull.Value : (object)TrainingId) ).ToList(); } return(studentattendance); }
public EmployeeMonthlySalary GetEmployeeMonthlySalary(Int64 PayoutId) { var empSalary = new EmployeeMonthlySalary(); using (var db = new UserDBContext()) { empSalary = db.Database.SqlQuery <EmployeeMonthlySalary>("EXEC USP_GetIndividualEmployeeMonthlySalary @PayoutId" , new SqlParameter("@PayoutId", PayoutId) ).FirstOrDefault(); } return(empSalary); }
public List <CheckInCheckOutView> GetCandidateCheckIn(string SubscriberId) { var CheckedInCandidate = new List <CheckInCheckOutView>(); using (var db = new UserDBContext()) { var subscriberid = new SqlParameter("@SubscriberId", string.IsNullOrEmpty(SubscriberId) ? DBNull.Value : (object)SubscriberId); CheckedInCandidate = db.Database .SqlQuery <CheckInCheckOutView>("exec USP_GetCheckIn @SubscriberId ", subscriberid).ToList(); } return(CheckedInCandidate); }