示例#1
0
 public static bool XoaNhomThuoc(NhomThuocDTO nt)
 {
     try
     {
         string sql = @"DELETE from NhomThuoc WHERE MaNhom='" + nt.MaNhom + "' ";
         ConnectionData.ExeNonQuery(sql);
         return(true);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return(false);
     }
 }
示例#2
0
 public static bool SuaNhomThuoc(NhomThuocDTO nt)
 {
     try
     {
         string sql = @"UPDATE NhomThuoc SET TenNhom= N'" + nt.TenNhom + "' WHERE MaNhom= '" + nt.MaNhom + "'";
         ConnectionData.ExeNonQuery(sql);
         return(true);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return(false);
     }
 }
示例#3
0
 public static bool ThemNhomThuoc(NhomThuocDTO nt)
 {
     try
     {
         string sql = @"INSERT INTO NhomThuoc (MaNhom,TenNhom) Values('" + nt.MaNhom + "', N'" + nt.TenNhom + "' )";
         ConnectionData.ExeNonQuery(sql);
         return(true);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return(false);
     }
 }