internal List <LatterFormate> getLatterFormates(string OCOde) { try { //var query = (from latterFormate in _context.HRM_LETTER_FORMAT // where latterFormate.OCODE == OCOde // select latterFormate).OrderByDescending(x => x.LTR_ID); using (var _context = new ERPSSLHBEntities()) { return((from lF in _context.HRM_LETTER_FORMAT join Lt in _context.HRM_LetterType on lF.LTR_Type equals Lt.LatterTypeId where lF.OCODE == OCOde select new LatterFormate { LId = (int)lF.LTR_ID, Title = lF.LTR_Title, Type = Lt.LatterType }).ToList()); } } catch (Exception ex) { throw new Exception(ex.Message.ToString()); } }
public IEnumerable <HRM_EMPLOYEES_CONTRACT> GetEmployeeIDDetails(string employeeID, string OCODE) { using (var _context = new ERPSSLHBEntities()) { return((from emp in _context.HRM_PersonalInformations //join srv in _context.HRM_SERVICE_CONTRACT on emp.EID equals srv.EID join d in _context.HRM_DEPARTMENTS on emp.DepartmentId equals d.DPT_ID join dg in _context.HRM_DESIGNATIONS on emp.DesginationId equals dg.DEG_ID where emp.EID == employeeID && emp.OCODE == OCODE select new HRM_EMPLOYEES_CONTRACT { EMP_ID = (Int64)emp.EmpId, EID = emp.EID, EMP_FIRSTNAME = emp.FirstName, EMP_LASTNAME = emp.LastName, EMP_CONTACT_NO = emp.ContactNumber, //CONTRACT = srv.CONTRACT, DEG_NAME = dg.DEG_NAME, //DEG_ID = dg.DEG_ID, DPT_NAME = d.DPT_NAME //DPT_ID = d.DPT_ID, }).ToList()); } }
public virtual List <REmployee> GetAllEmployeeByDept(string OCODE, string depCode) { //try //{ // var query = (from emp in _context.HRM_PersonalInformations join dpt in _context.HRM_DEPARTMENTS on emp.DepartmentId equals dpt.DPT_ID // where emp.OCODE == OCODE && dpt.DPT_CODE == depCode // select emp).OrderBy(x => x.FirstName); // return query.ToList(); //} //catch (Exception ex) //{ // throw ex; //} using (var _context = new ERPSSLHBEntities()) { return((from emp in _context.HRM_PersonalInformations join dpt in _context.HRM_DEPARTMENTS on emp.DepartmentId equals dpt.DPT_ID where emp.OCODE == OCODE && dpt.DPT_CODE == depCode select new REmployee { EID = emp.EID, FullName = emp.FirstName + " " + emp.LastName + "-" + emp.EID }).ToList()); } }
public int InsertEmployeeLeave(HRM_LEAVE_EMPLOYEE obj) { int result = 0; using (var _context = new ERPSSLHBEntities()) { var PRM_EMP_ID = new SqlParameter("EMP_ID", obj.EMP_ID); var PRM_EID = new SqlParameter("EID", obj.EID); var PRM_LEV_TYPE_ID = new SqlParameter("LEV_TYPE_ID", obj.LEV_TYPE_ID); var PRM_TOTAL_LEV_DAYS = new SqlParameter("TOTAL_LEV_DAYS", obj.TOTAL_LEV_DAYS); var PRM_REMARKS = new SqlParameter("REMARKS", obj.REMARKS); var PRM_EDIT_USER = new SqlParameter("EDIT_USER", obj.EDIT_USER); var PRM_EDIT_DATE = new SqlParameter("EDIT_DATE", obj.EDIT_DATE); var PRM_OCODE = new SqlParameter("OCODE", obj.OCODE); string SP_SQL = "ENTER_EMPLOYEE_LEAVE @EMP_ID,@EID,@LEV_TYPE_ID,@TOTAL_LEV_DAYS,@REMARKS,@EDIT_USER,@EDIT_DATE,@OCODE"; //int return_value = _context.ExecuteStoreQuery<int>(SP_SQL, PRM_EMP_ID, PRM_EID, PRM_LEV_TYPE_ID, PRM_TOTAL_LEV_DAYS, PRM_REMARKS, PRM_EDIT_USER, PRM_EDIT_DATE, PRM_OCODE); int return_value = _context.ExecuteStoreQuery <int>(SP_SQL, PRM_EMP_ID, PRM_EID, PRM_LEV_TYPE_ID, PRM_TOTAL_LEV_DAYS, PRM_REMARKS, PRM_EDIT_USER, PRM_EDIT_DATE, PRM_OCODE).FirstOrDefault(); if (return_value == 1) { result = 1; } else if (return_value == 2) { result = 2; } else { result = 0; } return(result); } }
internal int UpdateLeaveChangeForReportingBoss2(List <HRM_LeaveApply> newLeaveApplyList) { string LeaveCOde = ""; string Ocode = ""; foreach (HRM_LeaveApply oaitem in newLeaveApplyList) { using (var _context = new ERPSSLHBEntities()) { string laeaveDate = oaitem.LeaveDates.ToString(); string approveDate = oaitem.ReportingBossHRMApproveDate.ToString(); LeaveCOde = oaitem.LeaveCode; Ocode = oaitem.OCODE; var ParamempID = new SqlParameter("@ocode", oaitem.OCODE); var ParamempID1 = new SqlParameter("@date", laeaveDate); var ParamempID2 = new SqlParameter("@LeaveCode", oaitem.LeaveCode); var ParamempID3 = new SqlParameter("@ApproveDate", approveDate); var ParamempID4 = new SqlParameter("@HrmApproveStatus", oaitem.ReprotingBossHRmApporveStatus); string SP_SQL = "HRM_UpdateLeaveForReportinBoss2ByCodeandDate @ocode,@date,@LeaveCode,@ApproveDate,@HrmApproveStatus"; _context.ExecuteStoreCommand(SP_SQL, ParamempID, ParamempID1, ParamempID2, ParamempID3, ParamempID4); } } using (var _context = new ERPSSLHBEntities()) { var ParamempID = new SqlParameter("@OCODE", Ocode); var ParamempID1 = new SqlParameter("@LeaveCode", LeaveCOde); string SP_SQL = "HRM_DeleteLeaveDateByReportingBoss2AppoveStatus @OCODE,@LeaveCode"; _context.ExecuteStoreCommand(SP_SQL, ParamempID, ParamempID1); } return(1); }
public IEnumerable <HRM_EMP_SALARY_UPDATE> GetEmployeeID(string employeeID, string OCODE) { using (var _context = new ERPSSLHBEntities()) { return((from emp in _context.HRM_PersonalInformations //join srv in _context.HRM_SERVICE_CONTRACT on emp.EMP_ID equals srv.EMP_ID join d in _context.HRM_DEPARTMENTS on emp.DepartmentId equals d.DPT_ID join dg in _context.HRM_DESIGNATIONS on emp.DesginationId equals dg.DEG_ID where emp.EID == employeeID && emp.OCODE == OCODE && emp.EMP_TERMIN_STATUS == false && emp.EMP_Retired_Status == false && emp.EMP_Resignation_Status == false select new HRM_EMP_SALARY_UPDATE { EMP_ID = (Int64)emp.EmpId, EID = emp.EID, EMP_FIRSTNAME = emp.FirstName, EMP_LASTNAME = emp.LastName, EMP_CONTACT_NO = emp.ContactNumber, Grade = emp.Grade, salary = (decimal)emp.Salary, //CONTRACT = srv.CONTRACT, DEG_NAME = dg.DEG_NAME, //DEG_ID = dg.DEG_ID, DPT_NAME = d.DPT_NAME, DesginationID = emp.DesginationId //DPT_ID = d.DPT_ID, }).ToList()); } }
protected void btnProcess_click(object sender, EventArgs e) { HRM_StoreLetter leterStoreobj = new HRM_StoreLetter(); try { leterStoreobj.EID = txtEid_AT.Text; leterStoreobj.Description = txtLatterDetails.Text; leterStoreobj.EDIT_USER = ((SessionUser)Session["SessionUser"]).UserId; leterStoreobj.EDIT_DATE = DateTime.Now; leterStoreobj.OCODE = ((SessionUser)Session["SessionUser"]).OCode; int result = latterFormateBll.SaveLetterFormate(leterStoreobj); if (result == 1) { var _context = new ERPSSLHBEntities(); var lastId = _context.HRM_StoreLetter.OrderByDescending(u => u.StoreLetterId).FirstOrDefault(); int lid = lastId.StoreLetterId; List <HRM_StoreLetter> vaues = latterFormateBll.getData(lid); ReportViewerEmp.LocalReport.DataSources.Clear(); ReportDataSource reportDataset = new ReportDataSource("LatterIssue", vaues); ReportViewerEmp.LocalReport.DataSources.Add(reportDataset); ReportViewerEmp.LocalReport.ReportPath = Server.MapPath("reports/LetterFormate.rdlc"); ReportViewerEmp.LocalReport.Refresh(); //lblmodalMessage.Text = ""; //ModalPopupExtender.Show(); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true); } }
public IEnumerable <HRM_EMPLOYEES_CONTRACT> GetEmployeeID(string employeeID, string OCODE) { using (var _context = new ERPSSLHBEntities()) { return((from emp in _context.HRM_EMPLOYEES //join srv in _context.HRM_SERVICE_CONTRACT on emp.EMP_ID equals srv.EMP_ID join d in _context.HRM_DEPARTMENTS on emp.DPT_ID equals d.DPT_ID join dg in _context.HRM_DESIGNATIONS on emp.DEG_ID equals dg.DEG_ID where emp.EID == employeeID && emp.OCODE == OCODE select new HRM_EMPLOYEES_CONTRACT { EMP_ID = (Int64)emp.EMP_ID, EID = emp.EID, EMP_FIRSTNAME = emp.EMP_FIRSTNAME, EMP_LASTNAME = emp.EMP_LASTNAME, EMP_CONTACT_NO = emp.EMP_CONTACT_NO, //CONTRACT = srv.CONTRACT, DEG_NAME = dg.DEG_NAME, //DEG_ID = dg.DEG_ID, DPT_NAME = d.DPT_NAME //DPT_ID = d.DPT_ID, }).ToList()); } }
protected void BtnSubmit_Click(object sender, EventArgs e) { using (var _context = new ERPSSLHBEntities()) { try { HRM_SERVICE_CONTRACT obj = new HRM_SERVICE_CONTRACT(); //Int64 EMP_ID = Convert.ToInt64(lblHiddenId.Text); string EMP_ID = txtEid_LV.Text; string CONTRACT = txtServiceDetails.Text; string EDIT_USER = Convert.ToString(((SessionUser)Session["SessionUser"]).UserId); DateTime EDIT_DATE = DateTime.Now; string OCODE = ((SessionUser)Session["SessionUser"]).OCode; string SP_SQL = "ENTER_SERVICE_CONTRACT @EMP_ID, @CONTRACT, @OCODE"; var ParamEid = new SqlParameter("EMP_ID", EMP_ID); var ParamCt = new SqlParameter("CONTRACT", txtServiceDetails.Text); var ParamOc = new SqlParameter("OCODE", OCODE); if (_context.ExecuteStoreCommand(SP_SQL, ParamEid, ParamCt, ParamOc) == 1) { pnl_result.Visible = true; lblMessage.Text = "Saved Successfully"; lblTrnsMessage.ForeColor = System.Drawing.Color.Green; } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true); } } }
internal int InsertAtt_ReasonIndByDepartment(int regionId, int officeId, int departmentId, DateTime date, TimeSpan inTime, TimeSpan outTime, int reasonTypeId, string reasonType, string remarks, Guid editUser, DateTime editDate, string oCode) { try { using (var _context = new ERPSSLHBEntities()) { var ParamempID = new SqlParameter("@RegionId", regionId); var ParamempID1 = new SqlParameter("@OfficeId", officeId); var ParamempID2 = new SqlParameter("@DepartmentId", departmentId); var ParamempID4 = new SqlParameter("@Date", date); var ParamempID5 = new SqlParameter("@InTime", inTime); var ParamempID6 = new SqlParameter("@OutTime", outTime); var ParamempID7 = new SqlParameter("@ReasonTypeId", reasonTypeId); var ParamempID8 = new SqlParameter("@ReasonType", reasonType); var ParamempID9 = new SqlParameter("@Remarks", remarks); var ParamempID10 = new SqlParameter("@Edit_User", editUser); var ParamempID11 = new SqlParameter("@Edit_Date", editDate); var ParamempID12 = new SqlParameter("@OCode", oCode); string SP_SQL = "HRM_InsertDepartmentAttendance @RegionId,@OfficeId,@DepartmentId,@Date,@InTime,@OutTime,@ReasonTypeId,@ReasonType,@Remarks,@Edit_User,@Edit_Date,@OCode"; _context.ExecuteStoreCommand(SP_SQL, ParamempID, ParamempID1, ParamempID2, ParamempID4, ParamempID5, ParamempID6, ParamempID7, ParamempID8, ParamempID9, ParamempID10, ParamempID11, ParamempID12); return(1); } } catch (Exception) { throw; } }
internal int InsertSalary_Proccess(DateTime dateFrom, DateTime dateTo, int totalDayofMonth, int totalWeekend, int totalHoliday, string shiftCode, string oCode, Guid edit_User) { try { using (var _context = new ERPSSLHBEntities()) { var Param = new SqlParameter("@DATE_FROM", dateFrom); var Param1 = new SqlParameter("@DATE_TO", dateTo); var Param2 = new SqlParameter("@TOTAL_DAY_OF_MONTH", totalDayofMonth); var Param3 = new SqlParameter("@TOTAL_WEEKEND", totalWeekend); var Param4 = new SqlParameter("@TOTAL_OTH_HOLIDAY", totalHoliday); var Param5 = new SqlParameter("@SHIFTCODE", shiftCode); var Param6 = new SqlParameter("@OCODE", oCode); var Param7 = new SqlParameter("@EDITUSER", edit_User); string SP_SQL = "HRM_Get_Employee_SalProccess @DATE_FROM,@DATE_TO,@TOTAL_DAY_OF_MONTH,@TOTAL_WEEKEND,@TOTAL_OTH_HOLIDAY,@SHIFTCODE,@OCODE,@EDITUSER"; _context.ExecuteStoreCommand(SP_SQL, Param, Param1, Param2, Param3, Param4, Param5, Param6, Param7); return(1); } } catch (Exception) { throw; } }
internal int DeletedEmployeeBankInfoLog(HRM_BankInfo_Delete_Log bankDelObj) { using (var context = new ERPSSLHBEntities()) { context.HRM_BankInfo_Delete_Log.AddObject(bankDelObj); context.SaveChanges(); return(1); } }
protected void btnUpload_Click(object sender, EventArgs e) { try { string FILE_TITLE = txtFileTitle.Text.Trim(); string employeeID = Convert.ToString(txtEid_LV.Text); Int64 EMP_ID = Convert.ToInt64(lblHiddenId.Text); string EDIT_USER = Convert.ToString(((SessionUser)Session["SessionUser"]).UserId); DateTime EDIT_DATE = DateTime.Now; string OCODE = ((SessionUser)Session["SessionUser"]).OCode; String FILE_TYPE = Path.GetExtension(FileUpload.FileName); string[] sizes = { "B", "KB", "MB", "GB" }; double len = Convert.ToDouble(FileUpload.PostedFile.ContentLength); int order = 0; while (len >= 1024 && order + 1 < sizes.Length) { order++; len = len / 1024; } string FILE_SIZE = String.Format("{0:0.##} {1}", len, sizes[order]); string FILE_NAME = Path.GetFileName(FileUpload.PostedFile.FileName); EnsureTrackDirectoriesExist(OCODE); string DB_FILE_PATH = "" + OCODE.ToString() + "\\" + FILE_NAME; //sets the image Save to Folder FileUpload.SaveAs(Server.MapPath("../HRM/File/" + OCODE.ToString() + "/" + FILE_NAME)); string SP_SQL = "ENTER_SERVICE_CONTRACT_FILE @EID,@FILE_TITLE,@FILE_TYPE,@FILE_PATH,@FILE_SIZE,@EDIT_USER,@EDIT_DATE,@OCODE"; //var ParamEMP_ID = new SqlParameter("EMP_ID", EMP_ID); var ParamemployeeID = new SqlParameter("EID", employeeID); var ParamFILE_TITLE = new SqlParameter("FILE_TITLE", FILE_TITLE); var ParamFILE_TYPE = new SqlParameter("FILE_TYPE", FILE_TYPE); var ParamDB_FILE_PATH = new SqlParameter("FILE_PATH", DB_FILE_PATH); var ParamFILE_SIZE = new SqlParameter("FILE_SIZE", FILE_SIZE); var ParamEDIT_USER = new SqlParameter("EDIT_USER", EDIT_USER); var ParamEDIT_DATE = new SqlParameter("EDIT_DATE", EDIT_DATE); var ParamOCODE = new SqlParameter("OCODE", OCODE); using (var _context = new ERPSSLHBEntities()) { Int32 result = _context.ExecuteStoreCommand(SP_SQL, ParamemployeeID, ParamFILE_TITLE, ParamFILE_TYPE, ParamDB_FILE_PATH, ParamFILE_SIZE, ParamEDIT_USER, ParamEDIT_DATE, ParamOCODE); pnl_result.Visible = true; lblMessage.Text = "Saved Successfully"; lblTrnsMessage.ForeColor = System.Drawing.Color.Green; BindGridEmployee(employeeID); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true); } }
private void DeleteHolidayType(string HolCode) { using (var _context = new ERPSSLHBEntities()) { var ParamempID = new SqlParameter("@holidayCode", HolCode); string SP_SQL = "HRM_DeleteHoliday @holidayCode"; _context.ExecuteStoreQuery <REmployee>(SP_SQL, ParamempID).ToList(); } }
public IEnumerable <HRM_EMPLOYEES_VIEWER> GetEmployeeDetailsID(string employeeID, string OCODE) { using (var _context = new ERPSSLHBEntities()) { return((from emp in _context.HRM_PersonalInformations join r in _context.HRM_Regions on emp.RegionsId equals r.RegionID join ofc in _context.HRM_Office on emp.OfficeId equals ofc.OfficeID join d in _context.HRM_DEPARTMENTS on emp.DepartmentId equals d.DPT_ID join s in _context.HRM_SECTIONS on emp.SectionId equals s.SEC_ID join ss in _context.HRM_SUB_SECTIONS on emp.SubSectionId equals ss.SUB_SEC_ID join dg in _context.HRM_DESIGNATIONS on emp.DesginationId equals dg.DEG_ID join sft in _context.HRM_TIMESCHEDULE on emp.ShiftCode equals sft.ShiftCode // join grd in _context.HRM_GRADE on emp.GradeId equals grd.GRADE_ID where emp.EID == employeeID && emp.OCODE == OCODE select new HRM_EMPLOYEES_VIEWER { EMP_ID = (int)emp.EmpId, EID = emp.EID, BIO_ID = emp.BIO_MATRIX_ID, REG_NAME = r.RegionName, REG_ID = r.RegionID, OFC_NAME = ofc.OfficeName, OFC_ID = ofc.OfficeID, DPT_NAME = d.DPT_NAME, DPT_ID = d.DPT_ID, SEC_NAME = s.SEC_NAME, SEC_ID = s.SEC_ID, SUB_SEC_NAME = ss.SUB_SEC_NAME, SUB_SEC_ID = ss.SUB_SEC_ID, DEG_NAME = dg.DEG_NAME, DEG_ID = dg.DEG_ID, SHIFT = sft.ShiftName, SHIFTCODE = sft.ShiftCode, Shift_TotalHour = sft.TotalHour, GRADE = emp.Grade, GorssSalary = (decimal)emp.Salary, //STEP = (int)grd.STEP, //GRADE_ID = grd.GRADE_ID, EMP_FIRSTNAME = emp.FirstName, EMP_LASTNAME = emp.LastName //EMP_CONTACT_NO = emp.EMP_CONTACT_NO, //CONTRACT = srv.CONTRACT }).ToList()); } }
//-------GetAll------------------------------------ internal IEnumerable <Department> GetDepartment(string OCODE) { using (var _context = new ERPSSLHBEntities()) { var ParamempID = new SqlParameter("@OCODE", OCODE); string SP_SQL = "HRM_GetOfficeList @OCODE"; return((_context.ExecuteStoreQuery <Department>(SP_SQL, ParamempID)).ToList()); } }
internal List <RptBossDSG> GetRptBossDSG(int BossDSG) { using (var _context = new ERPSSLHBEntities()) { var rptBoss_ID = new SqlParameter("@RptBoss_ID", BossDSG); string SP_SQL = "RptBossDesignation @RptBoss_ID"; return((_context.ExecuteStoreQuery <RptBossDSG>(SP_SQL, rptBoss_ID)).ToList()); } }
internal void DeleteEmployeeBankInfo(string employee) { using (var context = new ERPSSLHBEntities()) { HRM_BankInfo ObjDel = (from b in context.HRM_BankInfo where b.EID == employee select b).FirstOrDefault(); context.HRM_BankInfo.DeleteObject(ObjDel); context.SaveChanges(); } }
internal IEnumerable <SubSection> GetSub_Sections(string OCODE) { using (var _context = new ERPSSLHBEntities()) { var ParamempID = new SqlParameter("@OCODE", OCODE); string SP_SQL = "HRM_GetSubSectionList @OCODE"; return((_context.ExecuteStoreQuery <SubSection>(SP_SQL, ParamempID)).ToList()); } }
internal int LeaveForDisApproveNotChangeForHRM(HRM_LeaveApply leaveApplyObj) { using (var _context = new ERPSSLHBEntities()) { var ParamempID = new SqlParameter("@LeaveCOde", leaveApplyObj.LeaveCode); var ParamempID1 = new SqlParameter("@ReprotingBoss1ApporveStatus", leaveApplyObj.ReprotingBossHRmDisApporveStatus); var ParamempID2 = new SqlParameter("@ReportingBoss1pproveDate", leaveApplyObj.ReportingBossHRMDisApproveDate); string SP_SQL = "HRM_LeaveDisApproveForForReportinHRM @LeaveCOde,@ReprotingBoss1ApporveStatus,@ReportingBoss1pproveDate"; _context.ExecuteStoreCommand(SP_SQL, ParamempID, ParamempID1, ParamempID2); return(1); } }
public IEnumerable <EmployementInfo> GetEmployemntInfo(string employeeid, string Ocode) { using (var _context = new ERPSSLHBEntities()) { var ParamempID = new SqlParameter("@ocode", Ocode); var ParamempID1 = new SqlParameter("@Eid", employeeid); string SP_SQL = "HRM_EmployementListByEID @ocode,@Eid"; return((_context.ExecuteStoreQuery <EmployementInfo>(SP_SQL, ParamempID, ParamempID1)).ToList()); } }
internal List <string> GetShiftCodeByOfficeID(int officeID) { List <string> shiftCodes = null; using (var _context = new ERPSSLHBEntities()) { shiftCodes = (from P in _context.HRM_PersonalInformations where P.OfficeId == officeID select P.ShiftCode).Distinct().ToList(); } return(shiftCodes); }
internal int DeletePaySalaryByEIDandMonth(string eid, DateTime salaryMonth) { using (var _context = new ERPSSLHBEntities()) { HRM_Pay_Salary paysalary = _context.HRM_Pay_Salary.FirstOrDefault(x => x.EID == eid && x.Salary_Month == salaryMonth); if (paysalary != null) { _context.HRM_Pay_Salary.DeleteObject(paysalary); _context.SaveChanges(); } return(1); } }
public IEnumerable <HRM_EMPLOYEES_VIEWER> GetEmployeeDetailsForAttendece(string employeeID, string OCODE) { using (var _context = new ERPSSLHBEntities()) { return((from emp in _context.HRM_PersonalInformations join r in _context.HRM_Regions on emp.RegionsId equals r.RegionID join ofc in _context.HRM_Office on emp.OfficeId equals ofc.OfficeID join d in _context.HRM_DEPARTMENTS on emp.DesginationId equals d.DPT_ID join s in _context.HRM_SECTIONS on emp.SectionId equals s.SEC_ID join ss in _context.HRM_SUB_SECTIONS on emp.SubSectionId equals ss.SUB_SEC_ID join dg in _context.HRM_DESIGNATIONS on emp.DesginationId equals dg.DEG_ID //join grd in _context.HRM_GRADE on emp.GradeId equals grd.GRADE_ID //join srv in _context.HRM_SERVICE_CONTRACT on emp.EMP_ID equals srv.EMP_ID where emp.EID == employeeID && emp.OCODE == OCODE select new HRM_EMPLOYEES_VIEWER { EMP_ID = (int)emp.EmpId, EID = emp.EID, FirstName = emp.FirstName, LastName = emp.LastName, REG_NAME = r.RegionName, REG_ID = r.RegionID, OFC_NAME = ofc.OfficeName, OFC_ID = ofc.OfficeID, DPT_NAME = d.DPT_NAME, DPT_ID = d.DPT_ID, SEC_NAME = s.SEC_NAME, SEC_ID = s.SEC_ID, SUB_SEC_NAME = ss.SUB_SEC_NAME, SUB_SEC_ID = ss.SUB_SEC_ID, DEG_NAME = dg.DEG_NAME, DEG_ID = dg.DEG_ID, //GRADE = grd.GRADE, //GRADE_ID = grd.GRADE_ID, //EMP_FIRSTNAME = emp.EMP_FIRSTNAME, //EMP_LASTNAME = emp.EMP_LASTNAME, //EMP_CONTACT_NO = emp.EMP_CONTACT_NO, //CONTRACT = srv.CONTRACT }).ToList()); } }
public IEnumerable <HRM_EMPLOYEES_CONTRACT> GetEmployeeContract(string employeeID, string OCODE) { using (var _context = new ERPSSLHBEntities()) { return((from emp in _context.HRM_PersonalInformations join srv in _context.HRM_SERVICE_CONTRACT on emp.EID equals srv.EID where emp.EID == employeeID && emp.OCODE == OCODE select new HRM_EMPLOYEES_CONTRACT { CONTRACT = srv.CONTRACT, }).ToList()); } }
public IEnumerable <HRM_LEAVE> GetEmployeeTotalLeave(string selectedTyoe, string OCODE) { using (var _context = new ERPSSLHBEntities()) { var query = (from ev in _context.HRM_LEAVE_TYPE where ev.LEV_TYPE == selectedTyoe && ev.OCODE == OCODE select new HRM_LEAVE { TOTAL_LEV_DAYS = (Int32)ev.LEV_DAYS }).ToList(); return(query); } }
public virtual List <TIMESCHEDULE> GetDistinctSchedule() { try { using (var _context = new ERPSSLHBEntities()) { string SP_SQL = "HRM_Get_DistinctShift"; return((_context.ExecuteStoreQuery <TIMESCHEDULE>(SP_SQL)).ToList()); } } catch (Exception) { throw; } }
internal CommercialR GetCommercialDetails() { try { using (var _context = new ERPSSLHBEntities()) { string SP_SQL = "[HRM_CommercialDetails]"; return((_context.ExecuteStoreQuery <CommercialR>(SP_SQL)).FirstOrDefault()); } } catch (Exception) { throw; } }
public static List <string> SearchCurrentEmployee(string prefixText, int count) { using (var _context = new ERPSSLHBEntities()) { var employees = from emp in _context.HRM_PersonalInformations where ((emp.EMP_TERMIN_STATUS == false && emp.EMP_Retired_Status == false && emp.EMP_Resignation_Status == false && emp.EMP_Dismissal_Status == false && emp.EMP_Died_Status == false && emp.EMP_Dis_Continution_Status == false && emp.EMP_Other == false) && (emp.FirstName.Contains(prefixText) || emp.LastName.Contains(prefixText) || emp.EID.Contains(prefixText) || emp.Gender.Contains(prefixText) || emp.ContactNumber.Contains(prefixText) || emp.Email.Contains(prefixText))) select emp; List <String> employeeList = new List <String>(); foreach (var employee in employees) { employeeList.Add(employee.EID + "-" + employee.FirstName + "-" + employee.LastName); } return(employeeList); } }
//internal InventoryDetailsR GetTodayStockDetails() //{ // try // { // using (var _context = new ERPSSLHBEntities()) // { // string SP_SQL = "Inv_TodayStockDetails"; // return (_context.ExecuteStoreQuery<InventoryDetailsR>(SP_SQL)).FirstOrDefault(); // } // } // catch (Exception) // { // throw; // } //} //internal InventoryDetailsR GetTodayReqDetails() //{ // try // { // using (var _context = new ERPSSLHBEntities()) // { // string SP_SQL = "Inv_TodayRequisitionDetails"; // return (_context.ExecuteStoreQuery<InventoryDetailsR>(SP_SQL)).FirstOrDefault(); // } // } // catch (Exception) // { // throw; // } //} internal InventoryDetailsR GetInventoryDetails() { try { using (var _context = new ERPSSLHBEntities()) { string SP_SQL = "[Inv_InventoryDetailsR]"; return((_context.ExecuteStoreQuery <InventoryDetailsR>(SP_SQL)).FirstOrDefault()); } } catch (Exception) { throw; } }