/// <summary>
 /// [Tho.Bui] - Lấy dữ liệu Nhân Viên (Hre_ProfilePartyUnion) theo ProfileId
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Hre_ProfilePartyUnionModel Put(Hre_ProfilePartyUnionModel model)
 {
     var service = new Hre_ProfileServices();
     string status = string.Empty;
     List<object> listObj = new List<object>() { model.ProfileID };
     var entity = service.GetData<Hre_ProfilePartyUnionEntity>(listObj, ConstantSql.hrm_hr_sp_get_ProfilePartyUnionprofileId, UserLogin, ref status).FirstOrDefault();
     var model1 = entity.CopyData<Hre_ProfilePartyUnionModel>();
     model.ActionStatus = status;
     return model1;
 }
 /// <summary>
 /// [Tho.Bui] - Lấy dữ liệu ProfilePartyUnion theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Hre_ProfilePartyUnionModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Hre_ProfilePartyUnionModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetData<Hre_ProfilePartyUnionEntity>(Common.DotNetToOracle(id.ToString()), ConstantSql.hrm_hr_sp_get_ProfilePartyUnionId, ref status).FirstOrDefault();
     if (entity != null)
     {
         model = entity.CopyData<Hre_ProfilePartyUnionModel>();
     }
     model.ActionStatus = status;
     return model;
 }
Exemple #3
0
 /// <summary>
 /// Get profile ID
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 /// 
 public Hre_ProfilePartyUnionModel GetByProfileId(Guid? id)
 {
     if (id == null || id == Guid.Empty)
     {
         return null;
     }
     else
     {
         var service = new RestServiceClient<Hre_ProfilePartyUnionModel>(UserLogin);
         var modeltemp = new Hre_ProfilePartyUnionModel();
         modeltemp.ProfileID = (Guid)id;
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Hre_ProfilePartyUnion/", modeltemp);
         return result;
     }
 }