Ejemplo n.º 1
0
 public static string deleteMariage(int stuId)
 {
     try
     {
         DbEntry.UsingTransaction(delegate
         {
             Mariage mariage  = Mariage.FindById(stuId);
             mariage.IsDelete = true;
             mariage.Save();
         });
     }
     catch { return("fail"); }
     return("ok");
 }
Ejemplo n.º 2
0
 public static string UpdateMariage(int stuId, string name, bool sex, DateTime birthday, string addressOfH, bool isGetTW, string identityType, string identityNo, string domicileOfH, string domicileOfTW, string addressOfTW, string education, string company, string post, string consort, bool sexOfC, string addressOfTWPEI, DateTime birthdayOfC, string domicileOfC, string identityTypeOther, string identityNoOther, bool isWordH, string companyOfH, string postOfH, DateTime weddingDay, bool isCouple, string tip)
 {
     try
     {
         DbEntry.UsingTransaction(delegate
         {
             Mariage mariage           = Mariage.FindById(stuId);
             mariage.Name              = name;
             mariage.Sex               = sex;
             mariage.Birthday          = birthday;
             mariage.AddressOfH        = addressOfH;
             mariage.IsGetTW           = isGetTW;
             mariage.IdentityType      = identityType;
             mariage.IdentityNo        = identityNo;
             mariage.DomicileOfH       = domicileOfH;
             mariage.DomicileOfTW      = domicileOfTW;
             mariage.AddressOfTW       = addressOfTW;
             mariage.Education         = education;
             mariage.Company           = company;
             mariage.Post              = post;
             mariage.Consort           = consort;
             mariage.SexOfC            = sexOfC;
             mariage.AddressOfTWPEI    = addressOfTWPEI;
             mariage.BirthdayOfC       = birthdayOfC;
             mariage.DomicileOfC       = domicileOfC;
             mariage.IdentityTypeOther = identityTypeOther;
             mariage.IdentityNoOther   = identityNoOther;
             mariage.IsWordH           = isWordH;
             mariage.CompanyOfH        = companyOfH;
             mariage.PostOfH           = postOfH;
             mariage.WeddingDay        = weddingDay;
             mariage.IsCouple          = isCouple;
             mariage.Tip               = tip;
             mariage.Save();
         });
     }
     catch (Exception ex)
     {
         return("fail");
     }
     return("ok");
 }