本文整理汇总了C#中DataLayer.createMarriedRelationship方法的典型用法代码示例。如果您正苦于以下问题:C# DataLayer.createMarriedRelationship方法的具体用法?C# DataLayer.createMarriedRelationship怎么用?C# DataLayer.createMarriedRelationship使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataLayer
的用法示例。
在下文中一共展示了DataLayer.createMarriedRelationship方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ViewDidLoad
public override void ViewDidLoad()
{
base.ViewDidLoad ();
string imgurl = "http://41.185.30.19/Indemnities/" + MarriedRelationshipID.ToString () + ".jpg";
//if(RemoteFileExists(imgurl) == false) {
// Put alternative content/message here
btnSaveIndemnity.SetTitle ("Snap Indemnity", UIControlState.Normal);
btnSaveIndemnity.SetTitleColor (UIColor.Red, UIControlState.Normal);
//}
//else
//{
// // Put Internet Required Code here
// btnSaveIndemnity.SetTitle ("View Indemnity", UIControlState.Normal);
// btnSaveIndemnity.SetTitleColor (UIColor.Green, UIControlState.Normal);
//}
if (MarriedRelationshipID == 0) {
DataLayer dl = new DataLayer ();
dl.Sync ();
MarriedRelationshipID = dl.createMarriedRelationship (0, 0);
}
btnSpouse1Detail.TouchUpInside += (object sender, EventArgs e) => {
UINavigationController parent = this.NavigationController;
PersonViewController pdvc = parent.Storyboard.InstantiateViewController("PersonViewController") as PersonViewController;
pdvc.PersonID = Spouse1ID;
parent.PushViewController(pdvc,true);
};
btnSpouse2Detail.TouchUpInside += (object sender, EventArgs e) => {
UINavigationController parent = this.NavigationController;
PersonViewController pdvc = parent.Storyboard.InstantiateViewController("PersonViewController") as PersonViewController;
pdvc.PersonID = Spouse2ID;
parent.PushViewController(pdvc,true);
};
btnChild1Detail.TouchUpInside += (object sender, EventArgs e) => {
UINavigationController parent = this.NavigationController;
ChildViewController pdvc = parent.Storyboard.InstantiateViewController("ChildViewController") as ChildViewController;
pdvc.PersonID = Child1ID;
parent.PushViewController(pdvc,true);
};
btnChild2Detail.TouchUpInside += (object sender, EventArgs e) => {
UINavigationController parent = this.NavigationController;
ChildViewController pdvc = parent.Storyboard.InstantiateViewController("ChildViewController") as ChildViewController;
pdvc.PersonID = Child2ID;
parent.PushViewController(pdvc,true);
};
btnChild3Detail.TouchUpInside += (object sender, EventArgs e) => {
UINavigationController parent = this.NavigationController;
ChildViewController pdvc = parent.Storyboard.InstantiateViewController("ChildViewController") as ChildViewController;
pdvc.PersonID = Child3ID;
parent.PushViewController(pdvc,true);
};
btnChild4Detail.TouchUpInside += (object sender, EventArgs e) => {
UINavigationController parent = this.NavigationController;
ChildViewController pdvc = parent.Storyboard.InstantiateViewController("ChildViewController") as ChildViewController;
pdvc.PersonID = Child4ID;
parent.PushViewController(pdvc,true);
};
btnChild5Detail.TouchUpInside += (object sender, EventArgs e) => {
UINavigationController parent = this.NavigationController;
ChildViewController pdvc = parent.Storyboard.InstantiateViewController("ChildViewController") as ChildViewController;
pdvc.PersonID = Child5ID;
parent.PushViewController(pdvc,true);
};
btnSpouse1.TouchUpInside += (object sender, EventArgs e) => {
if (Spouse1ID == 0)
{
UINavigationController parent = this.NavigationController;
PersonViewController pdvc = parent.Storyboard.InstantiateViewController("PersonViewController") as PersonViewController;
pdvc.PersonID = 0;
pdvc.MarriedRelionshipID = MarriedRelationshipID;
pdvc.Relationship = 1;
parent.PushViewController(pdvc,true);
}
else
{
if (Spouse2ID == 0)
{
DataLayer db = new DataLayer();
db.deleteSpouse1(MarriedRelationshipID);
this.Title = "Add Household";
loadHousehold();
}
else
{
UIAlertView alert = new UIAlertView("Can't delete","Delete the second spouse before deleting the first",null,"OK",null);
alert.Show();
}
}
};
//.........这里部分代码省略.........