示例#1
0
文件: KhachSan.cs 项目: thaimoc/ETour
        public static bool Update(KhachSan ks)
        {
            object rs       = DataProvider.Instance.ExecuteNonQuery("KhachSan_Update", ks.ID, ks.TenKS, ks.SoSao, ks.DiaChi, ks.SoDienThoai);
            int    affected = MyConvert.ToInt32(rs);

            if (affected > 0)
            {
                return(true);
            }
            return(false);
        }
示例#2
0
文件: KhachSan.cs 项目: thaimoc/ETour
 public static int Add(KhachSan ks)
 {
     try
     {
         object rs       = DataProvider.Instance.ExecuteNonQueryWithOutput("@ID", "KhachSan_Add", ks.ID, ks.TenKS, ks.SoSao, ks.DiaChi, ks.SoDienThoai);
         int    affected = MyConvert.ToInt32(rs);
         if (affected > 0)
         {
             return(int.Parse(rs.ToString()));
         }
         return(0);
     }
     catch { return(0); }
 }