Esempio n. 1
0
 public Boolean UpdateDVT(DonViTinh DVT) {
     SystemLog systemLog = new SystemLog(QuanLy.IDUser, DateTime.Now.ToString(), "Sửa đơn vị tính");
     busUser.SetSystemLog(systemLog);
     if (DvtQ.UpdateDVT(DVT) > 0)
     {
         return true;
     }
     else return false;
 }
Esempio n. 2
0
 public ArrayList SelectAllDVT()
 {
     SqlDataReader rd = dbHelper.ExecuteQuery("GetAllDVT");
     ArrayList arrDVT = new ArrayList();
     while (rd.Read())
     {
         DonViTinh DVT = new DonViTinh(rd.GetInt32(0), rd.GetString(1));
         arrDVT.Add(DVT);
     }
     rd.Close();
     return arrDVT;
 }
Esempio n. 3
0
        public int UpdateDVT(DonViTinh DVT)
        {
            List<SqlParameter> paramList = new List<SqlParameter>();
            SqlParameter param = new SqlParameter();
            param = new SqlParameter("@MaDVT", SqlDbType.Int);
            param.Value = DVT.MaDVT;
            paramList.Add(param);
            param = new SqlParameter("@TenDVT", SqlDbType.NVarChar);
            param.Value = DVT.Ten.Replace("'", "''");
            paramList.Add(param);            

            int i = dbHelper.ExecuteNonQuery("UpdateDVT", paramList);
            return i;
        }