public int UpdateDataCT(ChiTietPhieuMuon CTPYC)
 {
     SqlParameter[] para =
     {
         new SqlParameter("@maphieu", CTPYC.MaPM),
         new SqlParameter("@masach",  CTPYC.MaSach),
         new SqlParameter("@soluong", CTPYC.SoLuong),
     };
     return(conn.ExcuteSQL("SuaCTPM", para));
 }
 public int SuaCTPM(ChiTietPhieuMuon pm)
 {
     SqlParameter[] para =
     {
         new SqlParameter("MaPM",     pm.MaPM),
         new SqlParameter("MaSach",   pm.MaSach),
         new SqlParameter("NgayMuon", pm.NgayMuon),
         new SqlParameter("NgayTra",  pm.NgayTra),
         new SqlParameter("TienPhat", pm.TienPhat)
     };
     return(_connect.ExcuteSQL("SP_SuaCTPM", para));
 }
 public bool Them(ChiTietPhieuMuon pChiTietPhieuMuon)
 {
     try
     {
         string sql = string.Format("INSERT INTO ChiTietPhieuMuon "
                                    + "VALUES ('{0}','{1}')",
                                    pChiTietPhieuMuon.MaSach, pChiTietPhieuMuon.MaPhieuMuon);
         SqlCommand cmd = new SqlCommand(sql, _sqlConn);
         cmd.Connection.Open();
         cmd.ExecuteNonQuery();
         cmd.Connection.Close();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Example #4
0
 private void detach_ChiTietPhieuMuons(ChiTietPhieuMuon entity)
 {
     this.SendPropertyChanging();
     entity.ChiTietSach = null;
 }
Example #5
0
 partial void DeleteChiTietPhieuMuon(ChiTietPhieuMuon instance);
Example #6
0
 partial void UpdateChiTietPhieuMuon(ChiTietPhieuMuon instance);
Example #7
0
 partial void InsertChiTietPhieuMuon(ChiTietPhieuMuon instance);
Example #8
0
 private void attach_ChiTietPhieuMuons(ChiTietPhieuMuon entity)
 {
     this.SendPropertyChanging();
     entity.PhieuMuonSach = this;
 }