public DeleteHideOrgResult DeleteHideOrganization(HideOrg entity) { using (TransactionEntities Context = new TransactionEntities()) { var result = Context.DeleteHideOrg( orgCode: entity.OrgCode , hideDateFrom: entity.HideDateFrom , userCode: entity.UpdateBy ).FirstOrDefault(); return(result); } }
public SaveHideOrgResult SaveHideorganization(HideOrg entity, string Mode) { using (TransactionEntities context = new TransactionEntities()) { var result = context.SaveHideOrg( mode: Mode , hideDateFrom: entity.HideDateFrom , hideDateTo: entity.HideDateTo , orgCode: entity.OrgCode , divCodeKey: entity.DivCodeKey , deptCodeKey: entity.DeptCodeKey , secCodeKey: entity.SecCodeKey , userCode: entity.UpdateBy ).FirstOrDefault(); return(result); } }
public static HideOrganizationViewModel ToModel(this HideOrg data) { var entity = AutoMapper.Mapper.Map <HideOrganizationViewModel>(data); return(entity); }