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); } }
private void InsertOrderDetailRecord(OrderDetailRow paOrderDetailRow) { QueryClass lcQuery; lcQuery = new QueryClass(QueryClass.QueryType.InsertOrderDetailRecord); lcQuery.ReplaceRowPlaceHolder(paOrderDetailRow.Row); lcQuery.ExecuteNonQuery(); }
private void UpdateOrderDetailRecord(OrderDetailRow paOrderDetailRow) { QueryClass lcQuery; lcQuery = new QueryClass(QueryClass.QueryType.UpdateOrderDetailRecord); lcQuery.ReplaceRowPlaceHolder(paOrderDetailRow.Row); ApplicationFrame.GetInstance().ActiveFormInfoManager.ReplaceQueryPlaceHolder(lcQuery); lcQuery.ExecuteNonQuery(); }
public bool InsertRecord() { QueryClass lcQuery; if (clNewRecord) { lcQuery = new QueryClass(QueryClass.QueryType.InsertSessionRow); lcQuery.ReplaceRowPlaceHolder(clActiveRow.Row); return(lcQuery.ExecuteNonQuery() > 0); } else { return(false); } }
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); } }