public OrganizationAccountResponse GetStateList(OrganizationAccountRequest Request) { OrganizationAccountResponse OrgAccountResponse = new OrganizationAccountResponse(); try { Epi.Web.Interfaces.DataInterfaces.IStateDao StateDao = new EF.EntityStateDao(); Epi.Web.BLL.Account Implementation = new Epi.Web.BLL.Account(StateDao); OrgAccountResponse.StateList = Mapper.ToStateDTO(Implementation.GetStateList()); } catch (Exception ex) { throw ex; } return(OrgAccountResponse); }
public OrganizationAccountResponse GetUserOrgId(OrganizationAccountRequest Request) { OrganizationAccountResponse Response = new OrganizationAccountResponse(); try { Epi.Web.Interfaces.DataInterfaces.IAdminDao AdminDao = new EF.EntityAdminDao(); Epi.Web.Interfaces.DataInterfaces.IOrganizationDao OrganizationDao = new EF.EntityOrganizationDao(); Epi.Web.BLL.Account Implementation = new Epi.Web.BLL.Account(AdminDao, OrganizationDao); Response.OrganizationDTO = new OrganizationDTO(); Response.OrganizationDTO.OrganizationKey = Implementation.GetUserOrgId(Request.Admin.AdminEmail); } catch (Exception ex) { throw ex; } return(Response); }
public OrganizationAccountResponse CreateAccount(OrganizationAccountRequest pRequest) { OrganizationAccountResponse OrgAccountResponse = new OrganizationAccountResponse(); try { Epi.Web.Interfaces.DataInterfaces.IAdminDao AdminDao = new EF.EntityAdminDao(); Epi.Web.Interfaces.DataInterfaces.IOrganizationDao OrganizationDao = new EF.EntityOrganizationDao(); Epi.Web.BLL.Account Implementation = new Epi.Web.BLL.Account(AdminDao, OrganizationDao); var Organization = Mapper.ToBusinessObject(pRequest.Organization); var Admin = Mapper.ToBusinessObject(pRequest.Admin); OrgAccountResponse.Message = Implementation.CreateAccount(pRequest.AccountType, Admin, Organization); } catch (Exception ex) { throw ex; } return(OrgAccountResponse); }
public OrganizationAccountResponse GetOrganization(OrganizationAccountRequest request) { OrganizationAccountResponse OrgAccountResponse = new OrganizationAccountResponse(); try { Epi.Web.Interfaces.DataInterfaces.IOrganizationDao OrgDao = new EF.EntityOrganizationDao(); Epi.Web.BLL.Account Implementation = new Epi.Web.BLL.Account(null, OrgDao); OrganizationBO OrgInfo = Implementation.GetOrganization(request.Organization.OrganizationKey); if (OrgInfo != null) { OrgAccountResponse.OrganizationDTO = Mapper.ToDataTransferObjects(OrgInfo); } } catch (Exception ex) { throw ex; } return(OrgAccountResponse); }