Пример #1
0
        public string AddCaNiem(bot_caniemphat _bot_ca)
        {
            string sql_ = "insert into ca_niem_phat (ca_niem) values ('" + _bot_ca.ca_niem + "')";

            cn.Update(sql_);
            return("Thêm Ca niệm phật thành công!");
        }
Пример #2
0
        public string DeleteCaNiem(bot_caniemphat _bot_ca)
        {
            string sql_ = "delete from ca_niem_phat where ca_niem='" + _bot_ca.ca_niem + "'";

            cn.Update(sql_);
            return("Xóa Ca niệm phật thành công!");
        }
Пример #3
0
        public int checkCaNiem(bot_caniemphat _bot_ca)
        {
            string sqlTemp = "select count(*) from ca_niem_phat where ca_niem = '" + _bot_ca.ca_niem + "'";
            int    count   = int.Parse(cn.GetValue(sqlTemp).ToString());

            return((count == 0) ? 1 : 0);
        }