public void InsertPayrollPeriod(PayrollPeriod payrollPeriod) { using (var db = new PayrollEntities()) { db.PayrollPeriods.Add(payrollPeriod); db.SaveChanges(); } }
public void InsertIncome(Income income) { using (var db = new PayrollEntities()) { db.Incomes.Add(income); db.SaveChanges(); } }
public void AddEmployeeDeductions(AssignedEmployeeDeduction toDB) { using (var db = new PayrollEntities()) { db.AssignedEmployeeDeductions.Add(toDB); db.SaveChanges(); } }
public void InsertEmployee(UserPersonalInformation toDB) { using (var db = new PayrollEntities()) { db.UserPersonalInformations.Add(toDB); db.SaveChanges(); } }
public void AddEmployeeIncome(AssignedEmployeeIncome toDB) { using (var db = new PayrollEntities()) { db.AssignedEmployeeIncomes.Add(toDB); db.SaveChanges(); } }
public void InsertDepartment(Department department) { using (var db = new PayrollEntities()) { db.Departments.Add(department); db.SaveChanges(); } }
public void InsertDeduction(Deduction deduction) { using (var db = new PayrollEntities()) { db.Deductions.Add(deduction); db.SaveChanges(); } }
public void EmployeeAttendenceIns(int CompanyId, int EmployeeId, bool IsPresent, int UserId) { ObjectParameter returnMessage = new ObjectParameter("ReturnMessage", typeof(String)); using (PayrollEntities db = new PayrollEntities()) { db.SpEmployeeAttendenceIns(CompanyId, EmployeeId, IsPresent, UserId, returnMessage); } }
public void EmployeeAttendenceLogoutIns(int CompanyId, int AttendanceId) { ObjectParameter returnMessage = new ObjectParameter("ReturnMessage", typeof(String)); using (PayrollEntities db = new PayrollEntities()) { db.SpEmployeeAttendenceLogoutIns(CompanyId, AttendanceId, returnMessage); } }
public List <SpUserRoleSel_Result> UserRoleSel(int userId) { var model = new List <SpUserRoleSel_Result>(); using (PayrollEntities db = new PayrollEntities()) { model = db.SpUserRoleSel(userId).ToList(); } return(model); }
public SpVerifyEmployeeSel_Result verfiyEmployeeSel(string Email) { var model = new SpVerifyEmployeeSel_Result(); using (PayrollEntities db = new PayrollEntities()) { model = db.SpVerifyEmployeeSel(Email).FirstOrDefault(); } return(model); }
public List <Department> GetAllDepartments() { using (var db = new PayrollEntities()) { var query = from b in db.Departments orderby b.Active descending select b; return(query.ToList()); } }
public List <Income> GetAllIncomes() { using (var db = new PayrollEntities()) { var query = from b in db.Incomes orderby b.Order, b.Active ascending select b; return(query.ToList()); } }
public UserPersonalInformation GetEmployeesById(int id) { using (var db = new PayrollEntities()) { var query = from b in db.UserPersonalInformations where b.UserPersonalInformationId == id select b; return(query.FirstOrDefault()); } }
public List <UserPersonalInformation> GetAllEmployees() { using (var db = new PayrollEntities()) { var query = from b in db.UserPersonalInformations orderby b.Active descending select b; return(query.ToList()); } }
public Income GetIncomesById(int incomeId) { using (var db = new PayrollEntities()) { var query = from b in db.Incomes where b.IncomeId == incomeId select b; return(query.FirstOrDefault()); } }
public Deduction GetDeductionById(int deductionId) { using (var db = new PayrollEntities()) { var query = from b in db.Deductions where b.DeductionId == deductionId select b; return(query.FirstOrDefault()); } }
public List <Deduction> GetAllDeductions() { using (var db = new PayrollEntities()) { var query = from b in db.Deductions orderby b.Order, b.Active ascending select b; return(query.ToList()); } }
public ReturnMessageModel EmployeeleaveStatusTsk(EmployeeLeaveModel model) { ReturnMessageModel result = new ReturnMessageModel(); ObjectParameter returnMessage = new ObjectParameter("ReturnMessage", typeof(String)); using (PayrollEntities db = new PayrollEntities()) { db.SpEmployeeleaveStatusTsk(model.Status, model.EmployeeLeaveId, model.InsertUserId, returnMessage); return(result); } }
public DateTime[] GetPayrollPeriodFrom() { using (var db = new PayrollEntities()) { var query = (from b in db.PayrollPeriods orderby b.PayPeriodFrom descending select b.PayPeriodFrom).Distinct(); return(query.ToArray()); } }
public Department GetDepartmentById(int id) { using (var db = new PayrollEntities()) { var query = from b in db.Departments where b.DepartmentId == id select b; return(query.FirstOrDefault()); } }
public List <PayrollPeriod> GetPayrollPeriods() { using (var db = new PayrollEntities()) { var query = from b in db.PayrollPeriods orderby b.PayPeriodFrom descending select b; return(query.ToList()); } }
public PayrollTransactionDeduction GetPayrollTransactionDeduction(int payrollTransactionDeductionId) { using (var db = new PayrollEntities()) { var query = from b in db.PayrollTransactionDeductions where (b.PayrollTransactionDeductionId == payrollTransactionDeductionId) select b; return(query.FirstOrDefault()); } }
public List <AssignedEmployeeDeduction> GetAssignedEmployeeDeductions(int userPersonalInformationId) { using (var db = new PayrollEntities()) { var query = from a in db.AssignedEmployeeDeductions join b in db.Deductions on a.DeductionId equals b.DeductionId where a.UserPersonalInformationID == userPersonalInformationId select a; return(query.ToList()); } }
public AssignedEmployeeIncome GetAssignedEmployeeIncome(int userPersonalInformationId, int incomeId) { using (var db = new PayrollEntities()) { var query = from a in db.AssignedEmployeeIncomes where (a.UserPersonalInformationID == userPersonalInformationId) && (a.IncomeId == incomeId) select a; return(query.FirstOrDefault()); } }
public ReturnMessageModel CompanyIns(CompanyModel model) { ReturnMessageModel result = new ReturnMessageModel(); ObjectParameter returnMessage = new ObjectParameter("ReturnMessage", typeof(String)); using (PayrollEntities db = new PayrollEntities()) { db.SpCompanyIns(model.CompanyId, model.CompanyName, model.UserId, returnMessage); result.ReturnMessage = returnMessage.Value.ToString(); return(result); } }
public ReturnMessageModel LeaveUpdate(int LeaveId, int CompanyId, string LeaveName, int Days) { ReturnMessageModel result = new ReturnMessageModel(); ObjectParameter returnMessage = new ObjectParameter("ReturnMessage", typeof(String)); using (PayrollEntities db = new PayrollEntities()) { db.SpLeaveUpdate(LeaveId, CompanyId, LeaveName, Days, returnMessage); result.ReturnMessage = returnMessage.Value.ToString(); return(result); } }
public ReturnMessageModel LeaveDel(int LeaveId) { ReturnMessageModel result = new ReturnMessageModel(); ObjectParameter returnMessage = new ObjectParameter("ReturnMessage", typeof(String)); using (PayrollEntities db = new PayrollEntities()) { db.SpLeaveDel(LeaveId, returnMessage); result.ReturnMessage = returnMessage.Value.ToString(); return(result); } }
public ReturnMessageModel SalaryRateSetupIns(SalaryRateSetupModel model) { ReturnMessageModel result = new ReturnMessageModel(); ObjectParameter returnMessage = new ObjectParameter("ReturnMessage", typeof(String)); using (PayrollEntities db = new PayrollEntities()) { db.SpSalaryRateSetupIns(model.SalaryRateSetupId, model.CompanyId, model.RateName, model.From, model.Upto, model.Rate, model.InsertUserId, returnMessage); result.ReturnMessage = returnMessage.Value.ToString(); return(result); } }
public void UpdateEmployeeDepartment(int?userPersonalInformationID, int departmentID) { using (var db = new PayrollEntities()) { var result = db.UserPersonalInformations.SingleOrDefault(b => b.UserPersonalInformationId == userPersonalInformationID); if (result != null) { result.DepartmentId = departmentID; db.SaveChanges(); } } }