public DataTable GetUserEmployment(int UserID, int LanguageID) { PIKCV.DAL.UserEmployment obj = new PIKCV.DAL.UserEmployment(); try { return(obj.GetUserEmployment(UserID, LanguageID)); } catch (Exception) { return(null); } }
public bool RemoveUserEmployment(int UserEmploymentID) { try { PIKCV.DAL.UserEmployment obj = new PIKCV.DAL.UserEmployment(); obj.LoadByPrimaryKey(UserEmploymentID); obj.MarkAsDeleted(); obj.Save(); return(true); } catch (Exception) { return(false); } }
public bool SaveUserEmployment(int UserEmploymentID, int UserID, string CompanyName, string CompanyPhone, bool CanReference, int CityID, string OtherCityName, int CountryID, bool IsWorking, DateTime StartDate, DateTime EndDate, string JobDefiniton, int LabouringTypeID, int PositionID, string ReasonOfResignation, int SectorID) { PIKCV.DAO.TransactionMgr Tran = PIKCV.DAO.TransactionMgr.ThreadTransactionMgr(); try { PIKCV.DAL.UserEmployment obj = new PIKCV.DAL.UserEmployment(); if (UserEmploymentID > 0) { obj.LoadByPrimaryKey(UserEmploymentID); } else { obj.AddNew(); } obj.CompanyName = PIKCV.COM.Util.ReturnEmptyString(Util.ReplaceStrForDB(CompanyName)); obj.CompanyPhone = PIKCV.COM.Util.ReturnEmptyString(Util.ReplaceStrForDB(CompanyPhone)); obj.CanReference = CanReference; obj.CityID = CityID; obj.OtherCityName = PIKCV.COM.Util.ReturnEmptyString(Util.ReplaceStrForDB(OtherCityName)); obj.IsWorking = IsWorking; obj.CountryID = CountryID; obj.StartDate = StartDate; if (StartDate < EndDate) { obj.EndDate = EndDate; } obj.JobDescription = PIKCV.COM.Util.ReturnEmptyString(Util.ReplaceStrForDB(JobDefiniton)); obj.LabouringTypeID = LabouringTypeID; obj.PositionID = PositionID; obj.ReasonOfResignation = PIKCV.COM.Util.ReturnEmptyString(Util.ReplaceStrForDB(ReasonOfResignation)); obj.SectorID = SectorID; obj.UserID = UserID; PIKCV.DAL.UserCVs ObjCV = new PIKCV.DAL.UserCVs(); ObjCV.Where.UserID.Value = UserID; ObjCV.Query.Load(); if (ObjCV.RowCount < 1) { return(false); } ObjCV.ModifyDate = DateTime.Now; if (ObjCV.CvFocusCode < (int)PIKCV.COM.EnumDB.CVFocusCode.DriverLicense) { ObjCV.CvFocusCode = (int)PIKCV.COM.EnumDB.CVFocusCode.DriverLicense; } Tran.BeginTransaction(); ObjCV.Save(); obj.Save(); Tran.CommitTransaction(); return(true); } catch (Exception) { Tran.RollbackTransaction(); PIKCV.DAO.TransactionMgr.ThreadTransactionMgrReset(); return(false); } }
public DataTable GetUserEmploymentDetail(int UserEmploymentID) { PIKCV.DAL.UserEmployment obj = new PIKCV.DAL.UserEmployment(); obj.LoadByPrimaryKey(UserEmploymentID); return(obj.DefaultView.ToTable()); }