本文整理汇总了C#中Nop.Web.Models.Common.ContactUsModel类的典型用法代码示例。如果您正苦于以下问题:C# ContactUsModel类的具体用法?C# ContactUsModel怎么用?C# ContactUsModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContactUsModel类属于Nop.Web.Models.Common命名空间,在下文中一共展示了ContactUsModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Should_have_error_when_fullName_is_null_or_empty
public void Should_have_error_when_fullName_is_null_or_empty()
{
var model = new ContactUsModel();
model.FullName = null;
_validator.ShouldHaveValidationErrorFor(x => x.FullName, model);
model.FullName = "";
_validator.ShouldHaveValidationErrorFor(x => x.FullName, model);
}
示例2: Should_have_error_when_additional_comments_is_null_or_empty
public void Should_have_error_when_additional_comments_is_null_or_empty()
{
var model = new ContactUsModel();
model.AdditionalComments = null;
_validator.ShouldHaveValidationErrorFor(x => x.AdditionalComments, model);
model.AdditionalComments = "";
_validator.ShouldHaveValidationErrorFor(x => x.AdditionalComments, model);
}
示例3: Should_have_error_when_buyer_email_is_null_or_empty
public void Should_have_error_when_buyer_email_is_null_or_empty()
{
var model = new ContactUsModel();
model.BuyerEmail = null;
_validator.ShouldHaveValidationErrorFor(x => x.BuyerEmail, model);
model.BuyerEmail = "";
_validator.ShouldHaveValidationErrorFor(x => x.BuyerEmail, model);
}
示例4: Should_have_error_when_accounting_contact_is_null_or_empty
public void Should_have_error_when_accounting_contact_is_null_or_empty()
{
var model = new ContactUsModel();
model.AccountingContact = null;
_validator.ShouldHaveValidationErrorFor(x => x.AccountingContact, model);
model.AccountingContact = "";
_validator.ShouldHaveValidationErrorFor(x => x.AccountingContact, model);
}
示例5: Should_have_error_when_business_address_is_null_or_empty
public void Should_have_error_when_business_address_is_null_or_empty()
{
var model = new ContactUsModel();
model.BusinessAddress = null;
_validator.ShouldHaveValidationErrorFor(x => x.BusinessAddress, model);
model.BusinessAddress = "";
_validator.ShouldHaveValidationErrorFor(x => x.BusinessAddress, model);
}
示例6: Should_have_error_when_enquiry_is_null_or_empty
public void Should_have_error_when_enquiry_is_null_or_empty()
{
var model = new ContactUsModel();
model.Enquiry = null;
_validator.ShouldHaveValidationErrorFor(x => x.Enquiry, model);
model.Enquiry = "";
_validator.ShouldHaveValidationErrorFor(x => x.Enquiry, model);
}
示例7: Should_have_error_when_state_is_null_or_empty
public void Should_have_error_when_state_is_null_or_empty()
{
var model = new ContactUsModel();
model.StateProvince = null;
_validator.ShouldHaveValidationErrorFor(x => x.StateProvince, model);
model.StateProvince = "";
_validator.ShouldHaveValidationErrorFor(x => x.StateProvince, model);
}
示例8: ContactUs
public ActionResult ContactUs()
{
var model = new ContactUsModel()
{
Email = _workContext.CurrentCustomer.Email,
FullName = _workContext.CurrentCustomer.GetFullName(),
DisplayCaptcha = _captchaSettings.Enabled && _captchaSettings.ShowOnContactUsPage
};
return View(model);
}
示例9: ContactUs
//contact us page
public ActionResult ContactUs()
{
var model = new ContactUsModel()
{
Email = _workContext.CurrentCustomer.Email,
FullName = _workContext.CurrentCustomer.GetFullName()
};
return View(model);
}
示例10: Should_not_have_error_when_key_interest_is_specified
public void Should_not_have_error_when_key_interest_is_specified()
{
var model = new ContactUsModel();
model.KeyInterest = "Some key interest";
_validator.ShouldNotHaveValidationErrorFor(x => x.KeyInterest, model);
}
示例11: Should_not_have_error_when_phonenumber_is_specified
public void Should_not_have_error_when_phonenumber_is_specified()
{
var model = new ContactUsModel();
model.BusinessPhoneNumber = "Texas";
_validator.ShouldNotHaveValidationErrorFor(x => x.BusinessPhoneNumber, model);
}
示例12: Should_not_have_error_when_established_is_specified
public void Should_not_have_error_when_established_is_specified()
{
var model = new ContactUsModel();
model.Established = "something :|";
_validator.ShouldNotHaveValidationErrorFor(x => x.Established, model);
}
示例13: Should_not_have_error_when_home_address_is_specified
public void Should_not_have_error_when_home_address_is_specified()
{
var model = new ContactUsModel();
model.BusinessAddress = "This is an address";
_validator.ShouldNotHaveValidationErrorFor(x => x.HomeAddress, model);
}
示例14: Should_not_have_error_when_country_is_specified
public void Should_not_have_error_when_country_is_specified()
{
var model = new ContactUsModel();
model.Country = "Some country";
_validator.ShouldNotHaveValidationErrorFor(x => x.Country, model);
}
示例15: Should_not_have_error_when_company_name_is_specified
public void Should_not_have_error_when_company_name_is_specified()
{
var model = new ContactUsModel();
model.CompanyName = "Company Co";
_validator.ShouldNotHaveValidationErrorFor(x => x.CompanyName, model);
}