Esempio n. 1
0
 void ganDL(MuonSachDT dt)
 {
     dt.Sophieumuon = txtSoPhieuMuon.Text.Trim();
     dt.Mathe       = txtMaThe.Text.Trim();
     dt.Manv        = txtMaNV.Text.Trim();
     dt.Ngaymuon    = dateTra.Text.Trim();
 }
Esempio n. 2
0
 //SỬA dl
 public bool UpdateData(MuonSachDT dt)
 {
     cmd.CommandText = "UPDATE muonsach SET MaNV = '" + dt.Manv + "',MaThe='" + dt.Mathe + "', NgayMuon = CONVERT(DATE, '" + dt.Ngaymuon + "',103) WHERE SoPhieuMuon ='" + dt.Sophieumuon + "'";
     cmd.CommandType = CommandType.Text;
     cmd.Connection  = conn.Connection;
     try
     {
         conn.OpenConn();
         cmd.ExecuteNonQuery();
         conn.CloseConn();
         return(true);
     }
     catch (Exception ex)
     {
         string mex = ex.Message;
         cmd.Dispose();
         conn.CloseConn();
     }
     return(false);
 }
Esempio n. 3
0
 //thêm mới dl
 public bool AddData(MuonSachDT dt)
 {
     cmd.CommandText = "INSERT INTO muonsach VALUES ( '" + dt.Sophieumuon + "','" + dt.Mathe + "', '" + dt.Manv + "',CONVERT(DATE, '" + dt.Ngaymuon + "',103))";
     cmd.CommandType = CommandType.Text;
     cmd.Connection  = conn.Connection;
     try
     {
         conn.OpenConn();
         cmd.ExecuteNonQuery();
         conn.CloseConn();
         return(true);
     }
     catch (Exception ex)
     {
         string mex = ex.Message;
         cmd.Dispose();
         conn.CloseConn();
     }
     return(false);
 }
Esempio n. 4
0
 public bool UpdateData(MuonSachDT dt)
 {
     return(MH.UpdateData(dt));
 }
Esempio n. 5
0
 public bool AddData(MuonSachDT dt)
 {
     return(MH.AddData(dt));
 }