//insert expanse info into ST_EXP_DETAIL table
        public int insertExpanseDet(DataSet.DsPSMS.ST_EXP_DETAILRow dr)
        {
            if (dr == null)
            {
                return(-1);
            }
            Open();
            query = "INSERT INTO ST_EXP_DETAIL (EXP_ID, EXP_SUB_TITLE, AMOUNT, CRT_DT_TM, CRT_USER_ID, UPD_DT_TM, UPD_USER_ID, DEL_FLG)";

            data += dr.EXP_ID;
            data += ", '" + dr.EXP_SUB_TITLE + "'";
            data += ", '" + dr.AMOUNT + "'";
            data += ", '" + DateTime.Now + "'";
            data += ", '" + dr.CRT_USER_ID + "'";
            data += ", '" + dr.UPD_DT_TM + "'";
            data += ", '" + dr.UPD_USER_ID + "'";
            data += ", " + 0;

            query += " VALUES (" + data + ");";
            SqlCommand cmd = new SqlCommand(query, conn);

            result = cmd.ExecuteNonQuery();
            Close();
            return(result);
        }
        // delete the cash information from ST_EXP_DETAIL tabel
        public void deleteExpDet(DataSet.DsPSMS.ST_EXP_DETAILRow dr)
        {
            DsPSMS.ST_EXP_DETAILDataTable expDetDt = new DsPSMS.ST_EXP_DETAILDataTable();
            Open();
            string query = "";

            query = "UPDATE ST_EXP_DETAIL SET DEL_FLG =" + 1 + " WHERE EXP_ID = " + dr.EXP_ID + " AND CRT_DT_TM='" + dr.CRT_DT_TM + "'";
            SqlCommand     cmd = new SqlCommand(query, conn);
            SqlDataAdapter da  = new SqlDataAdapter(cmd);

            cmd.ExecuteNonQuery();
            Close();
        }
        // update the cash information from ST_EXP_DETAIL tabel
        public int updateExpanseDet(DataSet.DsPSMS.ST_EXP_DETAILRow dr)
        {
            if (dr == null)
            {
                return(-1);
            }
            Open();
            query  = "UPDATE ST_EXP_DETAIL SET ";
            data  += " EXP_ID = " + dr.EXP_ID;
            data  += ", EXP_SUB_TITLE = '" + dr.EXP_SUB_TITLE + "'";
            data  += ", AMOUNT = '" + dr.AMOUNT + "'";
            data  += ", UPD_DT_TM = '" + dr.UPD_DT_TM + "'";
            data  += ", UPD_USER_ID = '" + dr.CRT_USER_ID + "'";
            query += data + " WHERE EXP_ID =" + dr.EXP_ID + " AND CRT_DT_TM = '" + dr.CRT_DT_TM + "' AND  DEL_FLG = " + 0;

            SqlCommand cmd = new SqlCommand(query, conn);

            result = cmd.ExecuteNonQuery();
            Close();
            return(result);
        }