Exemplo n.º 1
0
 public static bool UpdateVisitByPeople(int people_Id, string name, string relationship, DateTime arriveTime, DateTime leaveTime, string address, string phone)
 {
     try
     {
         DbEntry.UsingTransaction(delegate
         {
             Visit st        = Visit.FindOne(CK.K["People_Id"] == people_Id && CK.K["IsDelete"] == false);
             st.Name         = name;
             st.Relationship = relationship;
             st.ArriveTime   = arriveTime;
             st.LeaveTime    = leaveTime;
             st.Address      = address;
             st.Phone        = phone;
             st.Save();
         });
     }
     catch { return(false); }
     return(true);
 }