Esempio n. 1
0
        private String ExceuteCreateSubscriptionQuery()
        {
            QueryClass lcQueryClass;

            lcQueryClass = new QueryClass(QueryClass.QueryType.SPRCreateSubscription);
            lcQueryClass.ReplaceDictionaryPlaceHolder(clAuthenticationBlock);
            lcQueryClass.ReplaceDictionaryPlaceHolder(clDataBlock);

            return(Convert.ToString(lcQueryClass.GetResult()));
        }
Esempio n. 2
0
        public void ReplaceQueryPlaceHolder(QueryClass paQueryClass)
        {
            UserRow lcUserRow;

            if (paQueryClass != null)
            {
                if (ApplicationFrame.GetInstance().ActiveSessionController.User.IsLoggedIn)
                {
                    paQueryClass.ReplacePlaceHolder("$USERID", ApplicationFrame.GetInstance().ActiveSessionController.User.ActiveRow.UserID.ToString(), true);
                }

                paQueryClass.ReplaceRowPlaceHolder(ApplicationFrame.GetInstance().ActiveSubscription.ActiveRow.Row);
                paQueryClass.ReplaceRowPlaceHolder(ApplicationFrame.GetInstance().ActiveEservice.ActiveRow.Row);

                if ((lcUserRow = ApplicationFrame.GetInstance().ActiveSessionController.User.ActiveRow) == null)
                {
                    lcUserRow = new UserRow(TableManager.GetInstance().GetNewRow(TableManager.TableType.User, true));
                }

                paQueryClass.ReplaceRowPlaceHolder(lcUserRow.Row);

                paQueryClass.ReplacePlaceHolder("$ACTIVELANGUAGE", ApplicationFrame.GetInstance().ActiveSubscription.ActiveSetting.Language, true);

                paQueryClass.ReplaceDictionaryPlaceHolder(clFormParam, false);
            }
        }
Esempio n. 3
0
        public DataSet RunRetrieveQueryEx()
        {
            QueryClass lcQuery;

            if (!String.IsNullOrEmpty(ActiveRow.RetrieveQuery))
            {
                lcQuery = new QueryClass(ActiveRow.RetrieveQuery, clConnectionMode);
                ReplaceQueryPlaceHolder(lcQuery);
                lcQuery.ReplaceDictionaryPlaceHolder(clFormParam);
                return(lcQuery.RunQueryEx());
            }
            else
            {
                return(null);
            }
        }
Esempio n. 4
0
        private DataTable RetrieveData()
        {
            QueryClass lcQuery;

            if (!String.IsNullOrEmpty(clFormInfoRow.RetrieveQuery))
            {
                try
                {
                    lcQuery = new QueryClass(clFormInfoRow.RetrieveQuery, clConnectionMode);
                    lcQuery.ReplaceDictionaryPlaceHolder(clFormParam);
                    return(lcQuery.RunQuery());
                }
                catch (Exception paException)
                {
                    General.WriteExceptionLog(paException, "FORMINFOMANAGER.RETRIEVEDATA");
                }
            }
            return(null);
        }
Esempio n. 5
0
        private bool UpdatDataRecord(Dictionary <String, String> paActiveDataList)
        {
            QueryClass lcQuery;

            try
            {
                lcQuery = new QueryClass(clUpdateQuery, clConnectionMode);
                lcQuery.ReplaceDictionaryPlaceHolder(paActiveDataList);
                lcQuery.ReplacePlaceHolder("$COLUMNLIST", "N\'(" + paActiveDataList.GetData(ctKEYDataColumnList) + ")\'", false);
                lcQuery.ReplacePlaceHolder("$VALUELIST", BuildSQLValueString(paActiveDataList, ctKEYDataColumnList, ctComma), false);
                lcQuery.ReplacePlaceHolder("$UPDATEDATASTRING", BuildSQLColumnValueString(paActiveDataList, ctKEYDataColumnList, ctComma), false);
                lcQuery.ReplacePlaceHolder("$CONDITIONSTRING", BuildSQLColumnValueString(paActiveDataList, ctKEYKeyColumnList, " And "), false);

                return(lcQuery.ExecuteNonQuery() > 0);
            }
            catch (Exception paException)
            {
                General.WriteExceptionLog(paException, "UPDATEDATA : " + ApplicationFrame.GetInstance().ActiveSubscription.ActiveRow.SubscriptionID);
                return(false);
            }
        }