ASP.NET MVC 3.0을 사용하여 판매 주문 관리를위한 응용 프로그램을 개발 중입니다. 고객 정보를 추가 할 수있는 페이지를 개발해야합니다.ASP MVC 3.0 복잡한보기
고객 정보는
public class Customer
{
public int ID { get; set; }
public string Code { get; set; }
public string Name { get; set; }
public string Alias { get; set; }
public int DefaultCreditPeriod { get; set; }
public Accounts Accounts { get; set; }
public IList<Address> Addresses { get; set; }
public IList<Contact> Contacts { get; set; }
}
public class Accounts
{
public int ID { get; set; }
public string VATNo { get; set; }
public string CSTNo { get; set; }
public string PANNo { get; set; }
public string TANNo { get; set; }
public string ECCNo { get; set; }
public string ExciseNo { get; set; }
public string ServiceTaxNo { get; set; }
public bool IsServiceTaxApplicable { get; set; }
public bool IsTDSDeductable { get; set; }
public bool IsTCSApplicable { get; set; }
}
public class Address
{
public int ID { get; set; }
public AddressType Type { get; set; }
public string Line1 { get; set; }
public string Line2 { get; set; }
public string Line3 { get; set; }
public string Line4 { get; set; }
public string Country { get; set; }
public string PostCode { get; set; }
}
public class Contact
{
public int ID { get; set; }
public ContactType Type { get; set; }
public string Name { get; set; }
public string Title { get; set; }
public string PhoneNumber { get; set; }
public string Extension { get; set; }
public string MobileNumber { get; set; }
public string EmailId { get; set; }
public string FaxNumber { get; set; }
public string Website { get; set; }
}
고객 (일반 정보, 계정 정보는 정보와 연락처 정보를 주소) 모든 고객 정보를 기입 한 페이지를 필요 포함합니다. 여러 주소 (청구서 발송, 배송 등) 및 여러 연락처 (판매, 구매)가 있습니다. 나는 MVC가 처음이다. 위의보기를 만들고 여러 주소를 동적으로 추가하는 방법은 무엇입니까?
public ActionResult Index() {
var customer = GetCustomer(); // returns a Customer
return View(customer);
}
을 그리고보기는 다음과 같이 보입니다 :
불쾌감은 없지만 어떤 종류의 대답을 기대하십니까? 당신이 요구하고있는 것은 많은 학습을 필요로하는 많은 개별 단계를 포함합니다. 가장 좋은 방법은 공식 [Music Store 샘플] (http://www.asp.net/mvc/tutorials/mvc-music-store-part-1)과 같은 몇 가지 예를보고 페이지를 만들어보십시오. 당신이 더 구체적인 질문을 생각해 내면 다시 돌아 오게됩니다. –