Esempio n. 1
0
        /*
         * CapNhatLoaiDaiLy trả về
         * 1:thành công
         * 0:thất bại
         */
        public static int CapNhatLoaiDaiLy(DTO_LoaiDL loaiDL)
        {
            string query  = "update LoaiDaiLy set TenLoaiDL =N'" + loaiDL.TenLoaiDL + "' where IdLoaiDL=" + loaiDL.IdLoaiDL;
            int    result = ResultQuery.GetResultQuery(conn, query);

            return(result);
        }
Esempio n. 2
0
        public static ArrayList DSLoaiDaiLy()
        {
            ArrayList arrList = new ArrayList();
            DataTable dt      = new DataTable();

            dt = ResultQuery.GetTableResult(conn, "SELECT * FROM LoaiDaiLy ");
            int    id;
            string ten;

            foreach (DataRow r in dt.Rows)
            {
                id  = (int)r["IdLoaiDL"];
                ten = r["TenLoaiDL"].ToString();
                DTO_LoaiDL loaiDL = new DTO_LoaiDL(id, ten);
                arrList.Add(loaiDL);
            }

            return(arrList);
        }
Esempio n. 3
0
 public static int CapNhatLoaiDL(DTO_LoaiDL l)
 {
     return(DAL_LoaiDaiLy.CapNhatLoaiDaiLy(l));
 }