public int executeQuery(string sql, HAESQLiteVO vo)
        {
            int exeCnt = 0;

            try
            {
                conn.Open();
                sqlCmd             = conn.CreateCommand();
                sqlCmd.CommandText = sql;
                string columnName = string.Empty;
                for (int idx = 0; idx < vo.size(); idx++)
                {
                    columnName = vo.getKeys(idx);
                    sqlCmd.Parameters.AddWithValue("@" + columnName, vo.get(columnName));
                }
                exeCnt = sqlCmd.ExecuteNonQuery();
            }
            catch (Exception e)
            {
            }
            finally
            {
                conn.Close();
            }
            return(exeCnt);
        }
        public DataTable select(string sql, HAESQLiteVO vo)
        {
            DataTable dt = new DataTable();

            try
            {
                conn.Open();
                sqlCmd             = conn.CreateCommand();
                sqlCmd.CommandText = sql;
                string columnName = string.Empty;
                for (int idx = 0; idx < vo.size(); idx++)
                {
                    columnName = vo.getKeys(idx);
                    sqlCmd.Parameters.AddWithValue("@" + columnName, vo.get(columnName));
                }
                SQLiteDataReader reader = sqlCmd.ExecuteReader();
                dt.Load(reader);
            }
            catch
            {
            }
            finally
            {
                conn.Close();
            }
            return(dt);
        }
Beispiel #3
0
        private void insertStickerInfo()
        {
            HAESQLiteVO vo = new HAESQLiteVO();

            vo.set("form_id", stickerVO.FormId);
            vo.set("pos_x", this.Location.X);
            vo.set("pos_y", this.Location.Y);
            vo.set("form_width", this.Width);
            vo.set("form_height", this.Height);
            vo.set("prev_form_width", this.Width);
            vo.set("prev_form_height", this.Height);
            vo.set("form_opacity", tbarOpacity.Value);
            vo.set("title", lblFormTitle.Text);
            vo.set("contents", rtbContents.Text);
            vo.set("contents_rtf", rtbContents.Text);
            vo.set("fold_yn", "N");
            vo.set("hidden_yn", "N");
            vo.set("rgst_dt", DateTime.Today.ToLongDateString());
            vo.set("updt_dt", DateTime.Today.ToLongDateString());

            if (haeSQLiteQuery.insertStickerInfo(vo) > 0)
            {
                stickerVO.IudFlag = "U";
            }
        }
        public int deleteStickerInfo(HAESQLiteVO vo)
        {
            int cnt = 0;

            //string sql = string.Empty;
            //sql = doc.SelectSingleNode("//*[@id='deleteStickerInfo']").InnerText;
            cnt = haeSQLiteHelper.executeQuery(getQuery("deleteStickerInfo"), vo);
            return(cnt);
        }
        public DataTable getStickerInfoByFormId(HAESQLiteVO vo)
        {
            //string sql = string.Empty;
            //sql = doc.SelectSingleNode("//*[@id='getStickerInfoByFormId']").InnerText;
            DataTable dt = new DataTable();

            dt = haeSQLiteHelper.select(getQuery("getStickerInfoByFormId"), vo);
            return(dt);
        }
Beispiel #6
0
        private void deleteStickerInfo()
        {
            HAESQLiteVO vo = new HAESQLiteVO();

            vo.set("form_id", stickerVO.FormId);
            vo.set("del_yn", "Y");
            vo.set("del_dt", DateTime.Today.ToLongDateString());
            vo.set("updt_dt", DateTime.Today.ToLongDateString());
            if (haeSQLiteQuery.deleteStickerInfo(vo) > 0)
            {
                this.Close();
            }
        }
Beispiel #7
0
        private void updateStickerInfo()
        {
            HAESQLiteVO vo = new HAESQLiteVO();

            vo.set("form_id", stickerVO.FormId);
            vo.set("pos_x", this.Location.X);
            vo.set("pos_y", this.Location.Y);
            vo.set("form_width", this.Width);
            vo.set("form_height", this.Height);
            vo.set("prev_form_width", this.Width);
            vo.set("prev_form_height", previousFoldingSize.Height);
            vo.set("form_opacity", tbarOpacity.Value);
            vo.set("title", lblFormTitle.Text);
            vo.set("contents", rtbContents.Text);
            vo.set("contents_rtf", rtbContents.Text);
            vo.set("fold_yn", (folding)? "Y":"N");
            vo.set("hidden_yn", "N");
            vo.set("updt_dt", DateTime.Today.ToLongDateString());
            haeSQLiteQuery.updateStickerInfo(vo);
        }