Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }