コード例 #1
0
 public ActionResult AddRemoveDiv(int id, int divid, bool ischecked)
 {
     var d = DbUtil.Db.DivOrgs.SingleOrDefault(dd => dd.DivId == divid && dd.OrgId == id);
     if (ischecked && d == null)
     {
         d = new DivOrg { OrgId = id, DivId = divid };
         DbUtil.Db.DivOrgs.InsertOnSubmit(d);
         DbUtil.Db.SubmitChanges();
     }
     if (!ischecked && d != null)
     {
         DbUtil.Db.DivOrgs.DeleteOnSubmit(d);
         DbUtil.Db.SubmitChanges();
     }
     return new EmptyResult();
 }
コード例 #2
0
ファイル: Division.cs プロジェクト: clearfunction/bvcms
 private void detach_DivOrgs(DivOrg entity)
 {
     this.SendPropertyChanging();
     entity.Division = null;
 }
コード例 #3
0
ファイル: Division.cs プロジェクト: clearfunction/bvcms
 private void attach_DivOrgs(DivOrg entity)
 {
     this.SendPropertyChanging();
     entity.Division = this;
 }
コード例 #4
0
ファイル: Division.cs プロジェクト: chrisgundersen/bvcms
 private void detach_DivOrgs(DivOrg entity)
 {
     this.SendPropertyChanging();
     entity.Division = null;
 }
コード例 #5
0
ファイル: Division.cs プロジェクト: chrisgundersen/bvcms
 private void attach_DivOrgs(DivOrg entity)
 {
     this.SendPropertyChanging();
     entity.Division = this;
 }