/// <summary>
 /// 删除一个影类
 /// 返回 true 表示成功;
 /// 返回 false 表示该类不存在
 /// </summary>
 /// <param name="uType"></param>
 /// <returns></returns>
 public bool DeleteData(Renting_Management_System.Models.ImageTypeMod _imageType)
 {
     type = new Renting_Management_System.Models.ImageTypeMod();
     type = SelectData(_imageType.ImageTypeCode);
     if (type != null)
     {
         da = new DBConnection();
         StringBuilder deleteStr = new StringBuilder();
         deleteStr.Append("Delete From [ImageType] ");
         deleteStr.Append("Where 影类代码 = '");
         deleteStr.Append(_imageType.ImageTypeCode);
         deleteStr.Append("'");
         da.DeleteQuery(deleteStr.ToString());
         return true;
     }
     else
         return false;
 }
Пример #2
0
 /// <summary>
 /// 删除一个客户
 /// 返回 true 表示成功,否侧数据不存在
 /// </summary>
 /// <param name="_customer"></param>
 /// <returns></returns>
 public bool DeleteData(Renting_Management_System.Models.CustomerMod _customer)
 {
     customer = new Renting_Management_System.Models.CustomerMod();
     customer = SelectByID(_customer.CustomerID);
     if (customer != null)
     {
         StringBuilder deleteStr = new StringBuilder();
         deleteStr.Append("Delete From [Customer]");
         deleteStr.Append("Where 客户编号 = '");
         deleteStr.Append(_customer.CustomerID);
         deleteStr.Append("'");
         da = new DBConnection();
         da.DeleteQuery(deleteStr.ToString());
         return true;
     }
     else
     { return false; }
 }
Пример #3
0
 /// <summary>
 /// 删除一个影像
 /// 返回 true 表示成功,否侧数据不存在
 /// </summary>
 /// <param name="_image"></param>
 /// <returns></returns>
 public bool DeleteData(Renting_Management_System.Models.ImageMod _image)
 {
     image = new Renting_Management_System.Models.ImageMod();
     image = SelectByID(_image.ImageID);
     if (image == null)
     { return false; }
     else
     {
         StringBuilder deleteStr = new StringBuilder();
         deleteStr.Append("Delete From [Image] ");
         deleteStr.Append("Where 影像编号 = '");
         deleteStr.Append(_image.ImageID);
         deleteStr.Append("'");
         da = new DBConnection();
         da.DeleteQuery(deleteStr.ToString());
         return true;
     }
 }
Пример #4
0
 /// <summary>
 /// 删除一个地点
 /// 返回 true 表示成功
 /// 返回 false 表示数据不存在
 /// </summary>
 /// <param name="_local"></param>
 /// <returns></returns>
 public bool DeleteData(Renting_Management_System.Models.LocalMod _local)
 {
     local = new Renting_Management_System.Models.LocalMod();
     local = SelectData(_local.LocalCode);
     if (local != null)
     {
         da = new DBConnection();
         StringBuilder deleteStr = new StringBuilder();
         deleteStr.Append("Delete From [Local] ");
         deleteStr.Append("Where 地点代码 = '");
         deleteStr.Append(_local.LocalCode);
         deleteStr.Append("'");
         da.DeleteQuery(deleteStr.ToString());
         return true;
     }
     else
         return false;
 }
Пример #5
0
 /// <summary>
 /// 删除一个用户
 /// 返回 true 表示删除成功
 /// 返回 false 表示数据不存在
 /// </summary>
 /// <param name="_userID"></param>
 /// <returns></returns>
 public bool DeleteData(string _userID)
 {
     user = new Renting_Management_System.Models.UserMod();
     user = SelectByID(_userID);
     if (user != null)
     {
         StringBuilder deleteStr = new StringBuilder();
         deleteStr.Append("Delete From [User]");
         deleteStr.Append("Where 用户编号 = '");
         deleteStr.Append(_userID);
         deleteStr.Append("'");
         da = new DBConnection();
         da.DeleteQuery(deleteStr.ToString());
         return true;
     }
     else
     { return false; }
 }
Пример #6
0
 /// <summary>
 /// 删除一个租借记录
 /// 返回 true 表示成功,否侧该记录不存在
 /// </summary>
 /// <param name="_rent"></param>
 /// <returns></returns>
 public bool DeletData(Renting_Management_System.Models.RentMod _rent)
 {
     rent = new Renting_Management_System.Models.RentMod();
     rent =SelectBy_CustomerID_N_ImageID(_rent.CustomerID, _rent.ImageID);
     if (rent != null)
     {
         StringBuilder deleteStr = new StringBuilder();
         deleteStr.Append("Delete From [Rent]");
         deleteStr.Append("Where 客户编号 = '");
         deleteStr.Append(_rent.CustomerID);
         deleteStr.Append("' And 影像编号 = '");
         deleteStr.Append(_rent.ImageID);
         deleteStr.Append("'");
         da = new DBConnection();
         da.DeleteQuery(deleteStr.ToString());
         return true;
     }
     else
     {
         return false;
     }
 }