本文整理汇总了C#中System.Date.GetMonth方法的典型用法代码示例。如果您正苦于以下问题:C# Date.GetMonth方法的具体用法?C# Date.GetMonth怎么用?C# Date.GetMonth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Date
的用法示例。
在下文中一共展示了Date.GetMonth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: noFacebookSignup2SaveClick
void noFacebookSignup2SaveClick(jQueryEvent e)
{
e.PreventDefault();
if (AsyncInProgress)
return;
View.Connect_LoggedOut_NoFacebook_SignUp2_ErrorLabel.InnerHTML = "";
#region Check name
if (View.Connect_LoggedOut_NoFacebook_SignUp2_FirstNameTextbox.Value.Length == 0)
{
View.Connect_LoggedOut_NoFacebook_SignUp2_ErrorLabel.InnerHTML = "Enter your first name";
return;
}
if (View.Connect_LoggedOut_NoFacebook_SignUp2_LastNameTextbox.Value.Length == 0)
{
View.Connect_LoggedOut_NoFacebook_SignUp2_ErrorLabel.InnerHTML = "Enter your last name";
return;
}
if (View.Connect_LoggedOut_NoFacebook_SignUp2_FirstNameTextbox.Value.Length > 20)
{
View.Connect_LoggedOut_NoFacebook_SignUp2_ErrorLabel.InnerHTML = "First name is too long";
return;
}
if (View.Connect_LoggedOut_NoFacebook_SignUp2_LastNameTextbox.Value.Length > 20)
{
View.Connect_LoggedOut_NoFacebook_SignUp2_ErrorLabel.InnerHTML = "Last name is too long";
return;
}
#endregion
#region Check nickname
if (View.Connect_LoggedOut_NoFacebook_SignUp2_NicknameTextbox.Value.Length == 0)
{
View.Connect_LoggedOut_NoFacebook_SignUp2_ErrorLabel.InnerHTML = "Enter a nickname";
return;
}
if (View.Connect_LoggedOut_NoFacebook_SignUp2_NicknameTextbox.Value.Length < 2)
{
View.Connect_LoggedOut_NoFacebook_SignUp2_ErrorLabel.InnerHTML = "Nickname must be longer";
return;
}
if (View.Connect_LoggedOut_NoFacebook_SignUp2_NicknameTextbox.Value.Length > 20)
{
View.Connect_LoggedOut_NoFacebook_SignUp2_ErrorLabel.InnerHTML = "Nickname is too long";
return;
}
#endregion
#region Check date of birth
if (int.Parse(View.Connect_LoggedOut_NoFacebook_SignUp2_DateOfBirthYearDropDown.Value) < 0 ||
int.Parse(View.Connect_LoggedOut_NoFacebook_SignUp2_DateOfBirthMonthDropDown.Value) < 0 ||
int.Parse(View.Connect_LoggedOut_NoFacebook_SignUp2_DateOfBirthDayDropDown.Value) < 0)
{
View.Connect_LoggedOut_NoFacebook_SignUp2_ErrorLabel.InnerHTML = "Enter your date of birth";
return;
}
Date d = new Date();
d.SetFullYear(int.Parse(View.Connect_LoggedOut_NoFacebook_SignUp2_DateOfBirthYearDropDown.Value));
d.SetMonth(int.Parse(View.Connect_LoggedOut_NoFacebook_SignUp2_DateOfBirthMonthDropDown.Value));
d.SetDate(int.Parse(View.Connect_LoggedOut_NoFacebook_SignUp2_DateOfBirthDayDropDown.Value));
if (d.GetFullYear() != int.Parse(View.Connect_LoggedOut_NoFacebook_SignUp2_DateOfBirthYearDropDown.Value) ||
d.GetMonth() != int.Parse(View.Connect_LoggedOut_NoFacebook_SignUp2_DateOfBirthMonthDropDown.Value) ||
d.GetDate() != int.Parse(View.Connect_LoggedOut_NoFacebook_SignUp2_DateOfBirthDayDropDown.Value))
{
View.Connect_LoggedOut_NoFacebook_SignUp2_ErrorLabel.InnerHTML = "Check your date of birth";
return;
}
#endregion
#region Check sex
if (!View.Connect_LoggedOut_NoFacebook_SignUp2_SexMaleRadio.Checked && !View.Connect_LoggedOut_NoFacebook_SignUp2_SexFemaleRadio.Checked)
{
View.Connect_LoggedOut_NoFacebook_SignUp2_ErrorLabel.InnerHTML = "Enter your sex";
return;
}
#endregion
#region Check nickname
int thisAsyncOperation = RegisterStartAsync("Checking nickname...");
Server.GetUniqueNickName(
View.Connect_LoggedOut_NoFacebook_SignUp2_NicknameTextbox.Value,
NoFacebookSignUp2PanelLoginUsrK,
new Response(
delegate(Dictionary<object, object> response)
{
if (RegisterEndAsync(thisAsyncOperation))
return;
if (U.isTrue(response, "Exception"))
{
showError(7, "Internal server error");
//.........这里部分代码省略.........