Esempio n. 1
0
 //Sua
 public bool Update(DTO_ThuThu dTO_ThuThu)
 {
     try
     {
         cn.Open();
         string     SQL = string.Format("UPDATE ThuThu SET HoTen = '{0}', DiaChi = '{1}', SDT = '{2}', CMND = '{3}', EMAIL = '{4}', NgayVL = '{5}', Pass = '******' WHERE MaThuThu = '{7}'", dTO_ThuThu.HoTen, dTO_ThuThu.DiaChi, dTO_ThuThu.SoDT, dTO_ThuThu.CMND, dTO_ThuThu.Email, dTO_ThuThu.NgayVL, dTO_ThuThu.Password, dTO_ThuThu.MaThuThu);
         SqlCommand cmd = new SqlCommand(SQL, cn);
         if (cmd.ExecuteNonQuery() > 0)
         {
             return(true);
         }
     }
     catch (Exception e)
     {
     }
     finally
     {
         cn.Close();
     }
     return(false);
 }
Esempio n. 2
0
 //Them
 public bool Insert(DTO_ThuThu dTO_ThuThu)
 {
     try
     {
         cn.Open();
         string     SQL = string.Format("INSERT INTO ThuThu VALUES('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}')", dTO_ThuThu.MaThuThu, dTO_ThuThu.HoTen, dTO_ThuThu.DiaChi, dTO_ThuThu.SoDT, dTO_ThuThu.CMND, dTO_ThuThu.Email, dTO_ThuThu.NgayVL, dTO_ThuThu.Password);
         SqlCommand cmd = new SqlCommand(SQL, cn);
         if (cmd.ExecuteNonQuery() > 0)
         {
             return(true);
         }
     }
     catch (Exception e)
     {
     }
     finally
     {
         cn.Close();
     }
     return(false);
 }
Esempio n. 3
0
 public bool updateThuThu(DTO_ThuThu dTO_ThuThu)
 {
     return(dalThuThu.Update(dTO_ThuThu));
 }
Esempio n. 4
0
 public bool insertThuThu(DTO_ThuThu dTO_ThuThu)
 {
     return(dalThuThu.Insert(dTO_ThuThu));
 }