示例#1
0
        public bool UpdateBloodGroup(int BasicinfoId, BUSSINESS_ENTITIES.BloodGroupEntities BloodGroupEntities)
        {
            var success = false;

            if (BloodGroupEntities != null)
            {
                //using (var scope = new TransactionScope())
                //{
                var BLOODGROUPDetail = _UOW.BLOODGROUPRepository.GetByID(BasicinfoId);
                if (BLOODGROUPDetail != null)
                {
                    if (BloodGroupEntities.BLOODGROUP_NAME != null && BloodGroupEntities.BLOODGROUP_NAME != "")
                    {
                        BLOODGROUPDetail.BLOODGROUP_NAME = BloodGroupEntities.BLOODGROUP_NAME;
                    }

                    _UOW.BLOODGROUPRepository.Update(BLOODGROUPDetail);
                    _UOW.Save();
                    cache.Remove(CacheKey);
                    //scope.Complete();
                    success = true;
                    //}
                }
            }
            return(success);
        }
示例#2
0
 public int CreateBloodGroup(BUSSINESS_ENTITIES.BloodGroupEntities BloodGroupEntities)
 {
     if (BloodGroupEntities != null)
     {
         var BLOODGROUPDetail = new TBL_HRMS_BLOODGROUP_MASTER
         {
             BLOODGROUP_NAME = BloodGroupEntities.BLOODGROUP_NAME,
         };
         _UOW.BLOODGROUPRepository.Insert(BLOODGROUPDetail);
         _UOW.Save();
         cache.Remove(CacheKey);
     }
     return(Convert.ToInt32(BloodGroupEntities.ID));
 }