本文整理汇总了C#中People.SetDOBFromVNFormat方法的典型用法代码示例。如果您正苦于以下问题:C# People.SetDOBFromVNFormat方法的具体用法?C# People.SetDOBFromVNFormat怎么用?C# People.SetDOBFromVNFormat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类People
的用法示例。
在下文中一共展示了People.SetDOBFromVNFormat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadFromGUI
private bool LoadFromGUI(People p)
{
bool isDone = true;
try
{
p.Name = txtName.Text.Trim();
divErrName.Attributes["class"] = "hidden";
}
catch (Exception ex)
{
divErrName.InnerText = ex.Message;
divErrName.Attributes["class"] = "err";
isDone = false;
}
try
{
p.SetDOBFromVNFormat(txtDOB.Text.Trim(), true);
divErrDOB.Attributes["class"] = "hidden";
}
catch (Exception ex)
{
divErrDOB.Attributes["class"] = "err";
divErrDOB.InnerText = ex.Message;
isDone = false;
}
try
{
p.CMND = txtCMND.Text.Trim();
divErrCMND.Attributes["class"] = "hidden";
}
catch (Exception ex)
{
divErrCMND.InnerText = ex.Message;
divErrCMND.Attributes["class"] = "err";
isDone = false;
}
if (ddlSex.SelectedValue.ToGuid() == Guid.Empty)
{
//p.SexID = null;
divErrSex.Attributes["class"] = "err";
divErrSex.InnerText = "Chọn giới tính";
isDone = false;
}
else
{
p.SexID = ddlSex.SelectedValue.ToGuid();
divErrSex.Attributes["class"] = "hidden";
}
p.ResidentAddress = txtResidentAddress.Text.Trim();
try
{
p.SetResidentGeo3(txtResidentGeo.Text.Trim());
divErrResidentalGeo.Attributes["class"] = "hidden";
}
catch (Exception ex)
{
divErrResidentalGeo.Attributes["class"] = "err";
divErrResidentalGeo.InnerText = ex.Message;
isDone = false;
}
p.EnableMailingAddress = chkEnableMaillingAddress.Checked;
p.MailingAddress = txtMailingAddress.Text.Trim();
if (p.EnableMailingAddress.Value)
{
try
{
p.SetMailingGeo3(txtMailingGeo.Text.Trim());
divErrMailingGeo.Attributes["class"] = "hidden";
}
catch (Exception ex)
{
divErrMailingGeo.Attributes["class"] = "err";
divErrMailingGeo.InnerText = ex.Message;
isDone = false;
}
}
p.Job = txtJob.Text;
p.Email = txtEmail.Text;
p.Phone = txtPhone.Text;
p.Note = txtNote.Text;
return isDone;
}