public static CompanyWcfItem ConvertCompanyItemToWcf(this CompanyItem ci)
 {
     return(new CompanyWcfItem()
     {
         CompanyTypeEnum = (int)ci.CompanyTypeEnum, ContryCode = ci.ContryCode, CompanyTypeItem = ci.CompanyTypeItem.ConvertCompanyItemToWcf(), Id = ci.Id, Name = ci.Name
     });                                                                                                                                                                                              //CompanyTypeItem= ci.CompanyTypeItem
 }
        public void GetData(Action <CompanyItem, Exception> callback)
        {
            // Use this to connect to the actual data service

            var item = new CompanyItem(0, "DDD", 1, CompanyTypeEnum.Industry);

            callback(item, null);
        }
        public Task <string> AddCompany(CompanyItem company)
        {
            MetalogixWcfService.AddCompanyRequest request = new MetalogixWcfService.AddCompanyRequest(company.ConvertCompanyItemToWcf());

            MetalogixWcfService.AddCompanyResponse response = GmetalogixDemoServiceClient.AddCompany(request);
            return(Task.FromResult(response.AddCompanyResult));

            //GmetalogixDemoServiceClient. await  GmetalogixDemoServiceClient.AddCompanyAsync()
        }
 public Task <string> UpdateCompany(CompanyItem company)
 {
     throw new NotImplementedException();
 }