예제 #1
0
 public CustomerViewModel(Customer customer)
 {
     this.Customer = customer;
 }
예제 #2
0
 public static string GetCsvFromCustomer(Customer customer)
 {
     var Line = new System.Text.StringBuilder();
     Line.Append(customer.CustNo).Append("\t")
         .Append(customer.Furigana).Append("\t")
         .Append(customer.CustName).Append("\t")
         .Append(customer.Keisho).Append("\t")
         .Append(customer.CityName).Append("\t")
         .Append(customer.PostalCD).Append("\t")
         .Append(customer.PrefectureCD).Append("\t")
         .Append(customer.PrefectureName).Append("\t")
         .Append(customer.RegionCD).Append("\t")
         .Append(customer.RegionName).Append("\t")
         .Append(customer.Address1).Append("\t")
         .Append(customer.Address2).Append("\t")
         .Append(customer.Address3).Append("\t")
         .Append(customer.Address4).Append("\t")
         .Append(customer.Phone).Append("\t")
         .Append(customer.Fax).Append("\t")
         .Append(customer.Phone2).Append("\t")
         .Append(customer.MailAddress).Append("\t")
         .Append(customer.Memo).Append("\t")
         .Append(customer.Label).Append("\t")
         .Append(customer.LatestSend).Append("\t")
         .Append(customer.LatestResceive).Append("\t")
         .Append(customer.Delete);
     return Line.ToString();
 }
예제 #3
0
        private void AddNewCustomer()
        {
            //最大番号プラス1
            var CustNo = 1;
            if (this.entityService.Customers.Count > 1)
            {
                var firstOrDefault = this.entityService.Customers.OrderByDescending(x => x.CustNo).FirstOrDefault();
                if (firstOrDefault != null)
                    CustNo = firstOrDefault.CustNo + 1;
            }
            var customer = new Customer(CustNo) { Label = false, Delete = false };
            var customerVM = new CustomerViewModel(customer) { CustomerViewModels = this.CustomerViewModels };

            this.CustomerViewModels.Add(customerVM);
            this.RaisePropertyChanged(() => this.CustomerViewModels);
            this.SelectedCustomer = customerVM;
        }