本文整理汇总了C#中Individual.InsertIndividual方法的典型用法代码示例。如果您正苦于以下问题:C# Individual.InsertIndividual方法的具体用法?C# Individual.InsertIndividual怎么用?C# Individual.InsertIndividual使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Individual
的用法示例。
在下文中一共展示了Individual.InsertIndividual方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateIndividual
public JsonResult CreateIndividual(Individual Individual)
{
System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame();
System.Reflection.MethodBase methodBase = stackFrame.GetMethod();
log.Debug("Start: " + methodBase.Name);
try
{
Int32 returnValue = 0;
int checkSession = UserLogin.AuthenticateRequest();
if (checkSession == 0)
{
return Json(returnValue);
}
else
{
int createdBy = Convert.ToInt32(Session["UserID"]);
//var data = new Individual
//{
// ID = ID,
// Name = Name,
// Nationality = Nationality,
// SingaporePR = SingaporePR,
// Passport = Passport,
// NRICExpiryDate = NRICExpiryDate,
// DateOfBirth = DateOfBirth,
// NricFinNo = NricFinNo,
// AccPacCode = AccPacCode,
// AddressLine1 = AddressLine1,
// AddressLine2 = AddressLine2,
// AddressLine3 = AddressLine3,
// Country = Country,
// PostalCode = PostalCode,
// Occupation = Occupation,
// Email = Email,
// ContactNo = ContactNo,
// Fax = Fax,
// CreatedBy = createdBy
//};
Individual.CreatedBy = createdBy;
int result = Individual.InsertIndividual();
return Json(result);
}
}
catch (Exception ex)
{
log.Error("Error: " + ex);
return Json("");
}
finally
{
log.Debug("End: " + methodBase.Name);
}
}