示例#1
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);
            }
        }
示例#2
0
        private void InsertOrderDetailRecord(OrderDetailRow paOrderDetailRow)
        {
            QueryClass lcQuery;

            lcQuery = new QueryClass(QueryClass.QueryType.InsertOrderDetailRecord);
            lcQuery.ReplaceRowPlaceHolder(paOrderDetailRow.Row);

            lcQuery.ExecuteNonQuery();
        }
示例#3
0
        private void UpdateOrderDetailRecord(OrderDetailRow paOrderDetailRow)
        {
            QueryClass lcQuery;

            lcQuery = new QueryClass(QueryClass.QueryType.UpdateOrderDetailRecord);
            lcQuery.ReplaceRowPlaceHolder(paOrderDetailRow.Row);
            ApplicationFrame.GetInstance().ActiveFormInfoManager.ReplaceQueryPlaceHolder(lcQuery);

            lcQuery.ExecuteNonQuery();
        }
示例#4
0
        public bool InsertRecord()
        {
            QueryClass lcQuery;

            if (clNewRecord)
            {
                lcQuery = new QueryClass(QueryClass.QueryType.InsertSessionRow);
                lcQuery.ReplaceRowPlaceHolder(clActiveRow.Row);

                return(lcQuery.ExecuteNonQuery() > 0);
            }
            else
            {
                return(false);
            }
        }
示例#5
0
        private int InsertOrderInfoRecord(OrderInfoRow paOrderInfoRow)
        {
            object     lcResult;
            int        lcOrderNo;
            QueryClass lcQuery;

            lcQuery = new QueryClass(QueryClass.QueryType.InsertOrderInfoRecord);
            lcQuery.ReplaceRowPlaceHolder(paOrderInfoRow.Row);

            if (((lcResult = lcQuery.GetResult()) != null) && ((lcOrderNo = Convert.ToInt32(lcResult)) > 0))
            {
                return(lcOrderNo);
            }
            else
            {
                return(-1);
            }
        }