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));
 }
Ejemplo n.º 3
0
 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);
     }
 }
Ejemplo n.º 4
0
 private void detach_ChiTietPhieuMuons(ChiTietPhieuMuon entity)
 {
     this.SendPropertyChanging();
     entity.ChiTietSach = null;
 }
Ejemplo n.º 5
0
 partial void DeleteChiTietPhieuMuon(ChiTietPhieuMuon instance);
Ejemplo n.º 6
0
 partial void UpdateChiTietPhieuMuon(ChiTietPhieuMuon instance);
Ejemplo n.º 7
0
 partial void InsertChiTietPhieuMuon(ChiTietPhieuMuon instance);
Ejemplo n.º 8
0
 private void attach_ChiTietPhieuMuons(ChiTietPhieuMuon entity)
 {
     this.SendPropertyChanging();
     entity.PhieuMuonSach = this;
 }