//-------Update------------------------------------ public int UpdateEmployee(HRM_EMPLOYEES objEmp_update, int QueryStringId) { try { HRM_EMPLOYEES objEmp = _context.HRM_EMPLOYEES.First(x => x.EMP_ID == QueryStringId); objEmp.EMP_FIRSTNAME = objEmp_update.EMP_FIRSTNAME; _context.SaveChanges(); return(1); } catch (Exception ex) { throw ex; } }
//-------Insert------------------------------------ public Int64 InsertEmployee(HRM_EMPLOYEES objEmp) { try { _context.HRM_EMPLOYEES.AddObject(objEmp); _context.SaveChanges(); Int64 scope_id = objEmp.EMP_ID; return(scope_id); } catch (Exception ex) { throw new Exception(ex.Message.ToString()); } }
public int UpdateEmployee(HRM_EMPLOYEES objEmp_update, int QueryStringId) { return(objCtx_DAL.UpdateEmployee(objEmp_update, QueryStringId)); }
//-------Insert------------------------------------ public Int64 InsertEmployee(HRM_EMPLOYEES objEmp) { return(objCtx_DAL.InsertEmployee(objEmp)); }