コード例 #1
0
        public IndividualListResponse GetIndividualsByPage(int currentPage = 1, int itemsPerPage = 6, string IndividualName = "")
        {
            IndividualListResponse response = new IndividualListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <IndividualViewModel>, IndividualListResponse>("GetIndividualsByPage", new Dictionary <string, string>()
                {
                    { "CurrentPage", currentPage.ToString() },
                    { "itemsPerPage", itemsPerPage.ToString() },
                    { "IndividualName", IndividualName },
                });
                //response.TotalItems = WpfApiHandler.GetFromApi<int, IndividualViewModel, IndividualListResponse>("GetIndividualsCount", new Dictionary<string, string>() {
                //    { "CompanyID", companyId.ToString() },
                //    { "searchParameter", IndividualName }
                //}).TotalItems;

                response.Success = true;
            }

            catch (Exception ex)
            {
                response = new IndividualListResponse();
                response.IndividualsByPage = new List <IndividualViewModel>();
                response.Success           = false;
                response.Message           = ex.Message;
            }

            return(response);
        }
コード例 #2
0
        public OutputInvoiceResponse GetNewCodeValue()
        {
            OutputInvoiceResponse response = new OutputInvoiceResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <OutputInvoiceViewModel, OutputInvoiceResponse>("GetNewCodeValue", null);
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }
            return(response);
        }
コード例 #3
0
        public CompanyListResponse GetCompanies()
        {
            CompanyListResponse response = new CompanyListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <CompanyViewModel>, CompanyListResponse>("GetCompanies", null);
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }

            return(response);
        }
コード例 #4
0
        ///<summary>
        /// Gets new code for business partner creation
        ///</summary>
        ///<returns></returns>
        public CompanyResponse GetNewCodeValue()
        {
            CompanyResponse response = new CompanyResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <CompanyViewModel, CompanyResponse>("GetNewCodeValue", null);
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }

            return(response);
        }
コード例 #5
0
        ///<summary>
        /// Gets new code for business partner creation
        ///</summary>
        ///<returns></returns>
        public IndividualCodeResponse GetNewCodeValue()
        {
            IndividualCodeResponse response = new IndividualCodeResponse();

            try
            {
                response         = WpfApiHandler.GetFromApi <int, IndividualViewModel, IndividualCodeResponse>("GetNewCodeValue", null);
                response.Success = true;
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }

            return(response);
        }
        public PhysicalPersonProfessionListResponse GetPhysicalPersonItems(int companyId)
        {
            PhysicalPersonProfessionListResponse response = new PhysicalPersonProfessionListResponse();

            try
            {
                Dictionary <string, string> parameters = new Dictionary <string, string>();
                parameters.Add("CompanyID", companyId.ToString());

                response = WpfApiHandler.GetFromApi <List <PhysicalPersonProfessionViewModel>, PhysicalPersonProfessionListResponse>("GetPhysicalPersonItems", parameters);
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }
            return(response);
        }
コード例 #7
0
        public EmployeeLicenceItemListResponse GetEmployeeItems(int companyId)
        {
            EmployeeLicenceItemListResponse response = new EmployeeLicenceItemListResponse();

            try
            {
                Dictionary <string, string> parameters = new Dictionary <string, string>();
                parameters.Add("CompanyID", companyId.ToString());

                response = WpfApiHandler.GetFromApi <List <EmployeeLicenceItemViewModel>, EmployeeLicenceItemListResponse>("GetEmployeeItems", parameters);
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }
            return(response);
        }
        public BusinessPartnerOrganizationUnitListResponse GetBusinessPartnerOrganizationUnits(int companyId)
        {
            BusinessPartnerOrganizationUnitListResponse response = new BusinessPartnerOrganizationUnitListResponse();

            try
            {
                Dictionary <string, string> parameters = new Dictionary <string, string>();
                parameters.Add("CompanyID", companyId.ToString());

                response = WpfApiHandler.GetFromApi <List <BusinessPartnerOrganizationUnitViewModel>, BusinessPartnerOrganizationUnitListResponse>("GetBusinessPartnerOrganizationUnits", parameters);
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }
            return(response);
        }
コード例 #9
0
        public UserListResponse GetUsers()
        {
            UserListResponse response = new UserListResponse();

            try
            {
                response         = WpfApiHandler.GetFromApi <List <UserViewModel>, UserListResponse>("GetUsers", new Dictionary <string, string>());
                response.Success = true;
            }
            catch (Exception ex)
            {
                response.Users   = new List <UserViewModel>();
                response.Success = false;
                response.Message = ex.Message;
            }

            return(response);
        }
コード例 #10
0
        public ConstructionSiteCalculationListResponse GetConstructionSiteCalculations(int companyId)
        {
            ConstructionSiteCalculationListResponse response = new ConstructionSiteCalculationListResponse();

            try
            {
                Dictionary <string, string> parameters = new Dictionary <string, string>();
                parameters.Add("CompanyID", companyId.ToString());

                response = WpfApiHandler.GetFromApi <List <ConstructionSiteCalculationViewModel>, ConstructionSiteCalculationListResponse>("GetConstructionSiteCalculations", parameters);
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }
            return(response);
        }
        public BusinessPartnerOrganizationUnitListResponse GetBusinessPartnerOrganizationUnitsNewerThen(int companyId, DateTime?lastUpdateTime)
        {
            BusinessPartnerOrganizationUnitListResponse response = new BusinessPartnerOrganizationUnitListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <BusinessPartnerOrganizationUnitViewModel>, BusinessPartnerOrganizationUnitListResponse>("GetBusinessPartnerOrganizationUnitsNewerThen", new Dictionary <string, string>()
                {
                    { "CompanyId", companyId.ToString() },
                    { "LastUpdateTime", lastUpdateTime.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }
            return(response);
        }
コード例 #12
0
        public EmployeeAttachmentListResponse GetEmployeeAttachments(int companyId)
        {
            EmployeeAttachmentListResponse response = new EmployeeAttachmentListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <EmployeeAttachmentViewModel, EmployeeAttachmentListResponse>("GetEmployeeAttachments", new Dictionary <string, string>()
                {
                    { "CompanyId", companyId.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }

            return(response);
        }
コード例 #13
0
        public CityListResponse GetCities()
        {
            CityListResponse response = new CityListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <CityViewModel>, CityListResponse>("GetCities", new Dictionary <string, string>()
                {
                });
            }
            catch (Exception ex)
            {
                response.Cities  = new List <CityViewModel>();
                response.Success = false;
                response.Message = ex.Message;
            }

            return(response);
        }
        public PhysicalPersonProfessionListResponse GetPhysicalPersonItemsNewerThen(int companyId, DateTime?lastUpdateTime)
        {
            PhysicalPersonProfessionListResponse response = new PhysicalPersonProfessionListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <PhysicalPersonProfessionViewModel>, PhysicalPersonProfessionListResponse>("GetPhysicalPersonItemsNewerThen", new Dictionary <string, string>()
                {
                    { "CompanyId", companyId.ToString() },
                    { "LastUpdateTime", lastUpdateTime.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }
            return(response);
        }
コード例 #15
0
        public ConstructionSiteCalculationListResponse GetConstructionSiteCalculationsNewerThen(int companyId, DateTime?lastUpdateTime)
        {
            ConstructionSiteCalculationListResponse response = new ConstructionSiteCalculationListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <ConstructionSiteCalculationViewModel>, ConstructionSiteCalculationListResponse>("GetConstructionSiteCalculationsNewerThen", new Dictionary <string, string>()
                {
                    { "CompanyId", companyId.ToString() },
                    { "LastUpdateTime", lastUpdateTime.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }
            return(response);
        }
コード例 #16
0
        public EmployeeLicenceItemListResponse GetEmployeeItemsNewerThen(int companyId, DateTime?lastUpdateTime)
        {
            EmployeeLicenceItemListResponse response = new EmployeeLicenceItemListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <EmployeeLicenceItemViewModel>, EmployeeLicenceItemListResponse>("GetEmployeeItemsNewerThen", new Dictionary <string, string>()
                {
                    { "CompanyId", companyId.ToString() },
                    { "LastUpdateTime", lastUpdateTime.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }
            return(response);
        }
コード例 #17
0
        /// <summary>
        /// Get single active business partner for selected company
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IndividualResponse GetIndividual(int id)
        {
            IndividualResponse response = new IndividualResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <IndividualViewModel, IndividualResponse>("GetIndividual", new Dictionary <string, string>()
                {
                    { "id", id.ToString() },
                });
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }

            return(response);
        }
コード例 #18
0
        public IndividualListResponse GetIndividualsCount(string searchParameter = "")
        {
            IndividualListResponse response = new IndividualListResponse();

            try
            {
                Dictionary <string, string> parameters = new Dictionary <string, string>();
                parameters.Add("searchParameter", searchParameter);

                response         = WpfApiHandler.GetFromApi <List <IndividualViewModel>, IndividualListResponse>("GetIndividualsCount", parameters);
                response.Success = true;
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }

            return(response);
        }
コード例 #19
0
        public OutputInvoiceListResponse GetOutputInvoices(int companyId)
        {
            OutputInvoiceListResponse response = new OutputInvoiceListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <OutputInvoiceViewModel>, OutputInvoiceListResponse>("GetOutputInvoices", new Dictionary <string, string>()
                {
                    { "CompanyId", companyId.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.OutputInvoices = new List <OutputInvoiceViewModel>();
                response.Success        = false;
                response.Message        = ex.Message;
            }

            return(response);
        }
コード例 #20
0
        public IndividualListResponse GetIndividualsForPopup(string filterString)
        {
            IndividualListResponse response = new IndividualListResponse();

            try
            {
                Dictionary <string, string> parameters = new Dictionary <string, string>();
                parameters.Add("FilterString", filterString);

                response         = WpfApiHandler.GetFromApi <List <IndividualViewModel>, IndividualListResponse>("GetIndividualsForPopup", parameters);
                response.Success = true;
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }

            return(response);
        }
コード例 #21
0
        public FamilyMemberListResponse GetFamilyMembers(int companyId)
        {
            FamilyMemberListResponse response = new FamilyMemberListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <FamilyMemberViewModel>, FamilyMemberListResponse>("GetFamilyMembers", new Dictionary <string, string>()
                {
                    { "CompanyId", companyId.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.FamilyMembers = new List <FamilyMemberViewModel>();
                response.Success       = false;
                response.Message       = ex.Message;
            }

            return(response);
        }
コード例 #22
0
        public CompanyUserListResponse GetCompanyUsersNewerThan(DateTime?dateFrom)
        {
            CompanyUserListResponse response = new CompanyUserListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <CompanyUserViewModel>, CompanyUserListResponse>("GetCompanyUsersNewerThan", new Dictionary <string, string>()
                {
                    { "dateFrom", dateFrom.ToString() },
                });
            }
            catch (Exception ex)
            {
                response.CompanyUsers = new List <CompanyUserViewModel>();
                response.Success      = false;
                response.Message      = ex.Message;
            }

            return(response);
        }
コード例 #23
0
        public LimitationListResponse GetLimitations(int companyId)
        {
            LimitationListResponse response = new LimitationListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <LimitationViewModel>, LimitationListResponse>("GetLimitations", new Dictionary <string, string>()
                {
                    { "CompanyId", companyId.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.Limitations = new List <LimitationViewModel>();
                response.Success     = false;
                response.Message     = ex.Message;
            }

            return(response);
        }
コード例 #24
0
        public PhysicalPersonListResponse GetPhysicalPersons(int companyId)
        {
            PhysicalPersonListResponse response = new PhysicalPersonListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <PhysicalPersonViewModel, PhysicalPersonListResponse>("GetPhysicalPersons",
                                                                                                          new Dictionary <string, string>()
                {
                    { "CompanyID", companyId.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }

            return(response);
        }
コード例 #25
0
        public CompanyUserResponse Delete(Guid identifier)
        {
            CompanyUserResponse response = new CompanyUserResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <CompanyUserViewModel, CompanyUserResponse>("Delete", new Dictionary <string, string>()
                {
                    { "identifier", identifier.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.CompanyUser = new CompanyUserViewModel();
                response.Success     = false;
                response.Message     = ex.Message;
            }

            return(response);
        }
コード例 #26
0
        public AgencyListResponse GetAgencies(int companyId)
        {
            AgencyListResponse response = new AgencyListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <AgencyViewModel>, AgencyListResponse>("GetAgencies", new Dictionary <string, string>()
                {
                    { "CompanyId", companyId.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.Agencies = new List <AgencyViewModel>();
                response.Success  = false;
                response.Message  = ex.Message;
            }

            return(response);
        }
コード例 #27
0
        public ToDoStatusListResponse GetToDoStatuses(int companyId)
        {
            ToDoStatusListResponse response = new ToDoStatusListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <ToDoStatusViewModel>, ToDoStatusListResponse>("GetToDoStatuses", new Dictionary <string, string>()
                {
                    { "CompanyId", companyId.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.ToDoStatuses = new List <ToDoStatusViewModel>();
                response.Success      = false;
                response.Message      = ex.Message;
            }

            return(response);
        }
コード例 #28
0
        public DocumentFolderResponse Clear(int companyId)
        {
            DocumentFolderResponse response = new DocumentFolderResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <DocumentFolderViewModel, DocumentFolderResponse>("Clear", new Dictionary <string, string>()
                {
                    { "CompanyId", companyId.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.DocumentFolder = new DocumentFolderViewModel();
                response.Success        = false;
                response.Message        = ex.Message;
            }

            return(response);
        }
コード例 #29
0
        public CalendarAssignmentListResponse GetCalendarAssignments(int companyId)
        {
            CalendarAssignmentListResponse response = new CalendarAssignmentListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <CalendarAssignmentViewModel, CalendarAssignmentListResponse>("GetCalendarAssignments",
                                                                                                                  new Dictionary <string, string>()
                {
                    { "CompanyID", companyId.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }

            return(response);
        }
コード例 #30
0
        public BusinessPartnerTypeListResponse GetBusinessPartnerTypes(int companyId)
        {
            BusinessPartnerTypeListResponse response = new BusinessPartnerTypeListResponse();

            try
            {
                response = WpfApiHandler.GetFromApi <List <BusinessPartnerTypeViewModel>, BusinessPartnerTypeListResponse>("GetBusinessPartnerTypes", new Dictionary <string, string>()
                {
                    { "CompanyId", companyId.ToString() }
                });
            }
            catch (Exception ex)
            {
                response.BusinessPartnerTypes = new List <BusinessPartnerTypeViewModel>();
                response.Success = false;
                response.Message = ex.Message;
            }

            return(response);
        }