本文整理汇总了C#中Ict.Petra.Shared.MReporting.TParameterList类的典型用法代码示例。如果您正苦于以下问题:C# TParameterList类的具体用法?C# TParameterList怎么用?C# TParameterList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TParameterList类属于Ict.Petra.Shared.MReporting命名空间,在下文中一共展示了TParameterList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SetControls
/// <summary>
/// Sets the selected values in the controls, using the parameters loaded from a file
/// </summary>
/// <param name="AParameters"></param>
public void SetControls(TParameterList AParameters)
{
chkActivePartners.Checked = AParameters.Get("param_active").ToBool();
chkMailingAddressesOnly.Checked = AParameters.Get("param_mailing_addresses_only").ToBool();
chkFamiliesOnly.Checked = AParameters.Get("param_families_only").ToBool();
chkExcludeNoSolicitations.Checked = AParameters.Get("param_exclude_no_solicitations").ToBool();
}
开发者ID:Davincier,项目名称:openpetra,代码行数:11,代码来源:UC_ExtractChkFilter.ManualCode.cs
示例2: TestGeneralParametersProcessing
public void TestGeneralParametersProcessing()
{
TParameterList parameters = new TParameterList();
TVariant value = new TVariant();
value.ApplyFormatString("Currency");
Assert.AreEqual("0", value.ToFormattedString(), "null value for currency should be 0");
value = new TVariant(value.ToFormattedString());
parameters.Add("amountdue", value, -1, 2, null, null, ReportingConsts.CALCULATIONPARAMETERS);
parameters.Save("testDebug.csv", true);
Assert.AreEqual(true, parameters.Exists("amountdue", -1, 1, eParameterFit.eBestFitEvenLowerLevel), "can find added parameter");
Assert.AreEqual("0", parameters.Get("amountdue", -1, 2,
eParameterFit.eBestFit).ToFormattedString(), "currency parameter is stored not correctly");
//Assert.AreEqual("0", parameters.Get("amountdue", -1, 1, eParameterFit.eBestFit).ToFormattedString(), "currency parameter is stored not correctly");
Assert.AreEqual("0", parameters.Get("amountdue", -1, 1,
eParameterFit.eBestFitEvenLowerLevel).ToFormattedString(), "currency parameter cannot be accessed from level up");
parameters.Add("IntegerList", "300,400");
parameters.Save("test.csv", false);
parameters.Load(Path.GetFullPath("test.csv"));
Assert.AreEqual("eString:300,400", parameters.Get(
"IntegerList").EncodeToString(), "integers separated by comma should be treated as string");
parameters.Save("test2.csv", true);
}
开发者ID:Davincier,项目名称:openpetra,代码行数:25,代码来源:testParameters.cs
示例3: CalculateExtract
/// <summary>
/// calculate an extract from a report: all partners who have a Contact Log meeting selected criteria
/// </summary>
/// <param name="AParameters"></param>
/// <param name="AResults"></param>
/// <returns></returns>
public static bool CalculateExtract(TParameterList AParameters, TResultList AResults)
{
string SqlStmt = TDataBase.ReadSqlFile("Partner.Queries.ExtractPartnerByContactLog.sql");
QueryPartnerByContactLog ExtractQuery = new QueryPartnerByContactLog();
return ExtractQuery.CalculateExtractInternal(AParameters, SqlStmt, AResults);
}
开发者ID:Davincier,项目名称:openpetra,代码行数:13,代码来源:ExtractPartnerByContactLog.cs
示例4: RetrieveParameters
/// <summary>
/// retrieve parameters from client sent in AParameters and build up AParameterList to run SQL query
/// </summary>
/// <param name="AParameters"></param>
/// <param name="ASqlStmt"></param>
/// <param name="ASQLParameterList"></param>
protected override void RetrieveParameters(TParameterList AParameters, ref string ASqlStmt, ref List <OdbcParameter>ASQLParameterList)
{
ICollection <String>param_explicit_specialtypes;
// prepare list of special types
param_explicit_specialtypes = AParameters.Get("param_explicit_specialtypes").ToString().Split(new Char[] { ',', });
if (param_explicit_specialtypes.Count == 0)
{
throw new NoNullAllowedException("At least one option must be checked.");
}
// now add parameters to sql parameter list
ASQLParameterList.Add(TDbListParameterValue.OdbcListParameterValue("specialtype", OdbcType.VarChar, param_explicit_specialtypes));
ASQLParameterList.Add(new OdbcParameter("param_dateFieldsIncluded", OdbcType.Bit)
{
Value = !AParameters.Get("param_date_set").IsZeroOrNull()
});
ASQLParameterList.Add(new OdbcParameter("Date", OdbcType.Date)
{
Value = AParameters.Get("param_date_set").ToDate()
});
ASQLParameterList.Add(new OdbcParameter("param_active", OdbcType.Bit)
{
Value = AParameters.Get("param_active").ToBool()
});
ASQLParameterList.Add(new OdbcParameter("param_families_only", OdbcType.Bit)
{
Value = AParameters.Get("param_families_only").ToBool()
});
ASQLParameterList.Add(new OdbcParameter("param_exclude_no_solicitations", OdbcType.Bit)
{
Value = AParameters.Get("param_exclude_no_solicitations").ToBool()
});
}
开发者ID:Davincier,项目名称:openpetra,代码行数:41,代码来源:ExtractPartnerBySpecialType.cs
示例5: InitialiseData
/// <summary>
/// Initialisation
/// </summary>
public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject)
{
FUpdatingRelationColumns = false;
FPetraUtilsObject = APetraUtilsObject;
FColumnParameters = new TParameterList();
FColumnParameters.Add("MaxDisplayColumns", 0);
FPetraUtilsObject.FMaxDisplayColumns = 0;
FDuringApplyOrCancel = false;
FSelectedColumn = -1;
grdColumns.SortableHeaders = false;
grdColumns.SelectionMode = SourceGrid.GridSelectionMode.Column;
grdColumns.AutoStretchColumnsToFitWidth = false;
/* Hook up event that fires when a different row is selected */
grdColumns.Selection.FocusColumnEntered += new ColumnEventHandler(this.GrdColumns_FocusColumnEntered);
grdColumns.Selection.CellLostFocus += new ChangeActivePositionEventHandler(this.GrdColumns_CellLostFocus);
grdColumns.Selection.CellGotFocus += new ChangeActivePositionEventHandler(this.GrdColumns_CellGotFocus);
btnApply.Enabled = false;
btnCancel.Enabled = false;
rbtFromGL.Checked = true;
rbtFromGL.Enabled = false;
rbtCalculateExisting.Enabled = false;
cmbYearSelection.Enabled = false;
chkYTD.Enabled = false;
clbLedger.Enabled = false;
}
开发者ID:js1987,项目名称:openpetragit,代码行数:36,代码来源:UC_FinanceColumns.ManualCode.cs
示例6: SetParameters
/// <summary>
/// Used for passing a Partner's partner key to the screen before the screen is actually shown.
/// </summary>
/// <param name="APartnerKey">PartnerKey of the Partner to print.</param>
public void SetParameters(Int64 APartnerKey)
{
TParameterList Parameters = new TParameterList();
Parameters.Add("param_selection", "one partner");
Parameters.Add("param_partnerkey", APartnerKey);
this.ucoPartnerSelection.SetControls(Parameters);
}
开发者ID:Davincier,项目名称:openpetra,代码行数:12,代码来源:PrintPartner.ManualCode.cs
示例7: RetrieveParameters
/// <summary>
/// retrieve parameters from client sent in AParameters and build up AParameterList to run SQL query
/// </summary>
/// <param name="AParameters"></param>
/// <param name="ASqlStmt"></param>
/// <param name="ASQLParameterList"></param>
protected override void RetrieveParameters(TParameterList AParameters, ref string ASqlStmt, ref List <OdbcParameter>ASQLParameterList)
{
// now add parameters to sql parameter list
ASQLParameterList.Add(new OdbcParameter("base_extract", OdbcType.Int)
{
Value = AParameters.Get("param_base_extract").ToString()
});
}
开发者ID:Davincier,项目名称:openpetra,代码行数:14,代码来源:ExtractFamilyMembers.cs
示例8: CalculateExtract
/// <summary>
/// calculate an extract from a report: all partners living in a given city
/// </summary>
/// <param name="AParameters"></param>
/// <param name="AResults"></param>
/// <returns></returns>
public static bool CalculateExtract(TParameterList AParameters, TResultList AResults)
{
string SqlStmt = TDataBase.ReadSqlFile("Partner.Queries.ExtractByPartnerCity.sql");
// create a new object of this class and control extract calculation from base class
QueryPartnerByCity ExtractQuery = new QueryPartnerByCity();
return ExtractQuery.CalculateExtractInternal(AParameters, SqlStmt, AResults);
}
开发者ID:Davincier,项目名称:openpetra,代码行数:15,代码来源:ExtractByPartnerCity.cs
示例9: CalculateExtract
/// <summary>
/// calculate an extract from a report: all recipient that have given to particular fields (ledgers)
/// </summary>
/// <param name="AParameters"></param>
/// <param name="AResults"></param>
/// <returns></returns>
public static bool CalculateExtract(TParameterList AParameters, TResultList AResults)
{
string SqlStmt = TDataBase.ReadSqlFile("Gift.Queries.ExtractRecipientByField.sql");
// create a new object of this class and control extract calculation from base class
QueryRecipientByField ExtractQuery = new QueryRecipientByField();
return ExtractQuery.CalculateExtractInternal(AParameters, SqlStmt, AResults);
}
开发者ID:Davincier,项目名称:openpetra,代码行数:15,代码来源:ExtractRecipientByField.cs
示例10: CalculateExtract
/// <summary>
/// calculate an extract from a report: all partners living in a given city
/// </summary>
/// <param name="AParameters"></param>
/// <param name="AResults"></param>
/// <param name="AExtractId"></param>
/// <returns></returns>
public static bool CalculateExtract(TParameterList AParameters, TResultList AResults, out int AExtractId)
{
string SqlStmt = TDataBase.ReadSqlFile("Partner.Queries.ExtractFamilyMembers.sql");
// create a new object of this class and control extract calculation from base class
QueryFamilyMembersExtract ExtractQuery = new QueryFamilyMembersExtract();
return ExtractQuery.CalculateExtractInternal(AParameters, SqlStmt, AResults, out AExtractId);
}
开发者ID:Davincier,项目名称:openpetra,代码行数:16,代码来源:ExtractFamilyMembers.cs
示例11: SetControlsManual
private void SetControlsManual(TParameterList AParameters)
{
String CountryCode = AParameters.Get("param_country_code").ToString();
if ((CountryCode.Length > 0)
&& (CountryCode != "*"))
{
cmbCountry.SetSelectedString(CountryCode);
}
}
开发者ID:Davincier,项目名称:openpetra,代码行数:10,代码来源:TotalGiftPerDonor.ManualCode.cs
示例12: CalculateExtract
/// <summary>
/// calculate an extract from a report: all donors that have given to particular fields (ledgers)
/// </summary>
/// <param name="AParameters"></param>
/// <param name="AResults"></param>
/// <returns></returns>
public static bool CalculateExtract(TParameterList AParameters, TResultList AResults)
{
// Sql statements will be initialized later on in special treatment
string SqlStmt = "";
// create a new object of this class and control extract calculation from base class
QueryDonorByAmount ExtractQuery = new QueryDonorByAmount();
return ExtractQuery.CalculateExtractInternal(AParameters, SqlStmt, AResults);
}
开发者ID:Davincier,项目名称:openpetra,代码行数:16,代码来源:ExtractDonorByAmount.cs
示例13: TRptEvaluator
/// <summary>
/// constructor
/// </summary>
/// <param name="parameters"></param>
/// <param name="results"></param>
/// <param name="reportStore"></param>
/// <param name="report"></param>
/// <param name="dataDB"></param>
/// <param name="depth"></param>
/// <param name="column"></param>
/// <param name="lineId"></param>
/// <param name="parentRowId"></param>
public TRptEvaluator(TParameterList parameters,
TResultList results,
TReportStore reportStore,
TRptReport report,
TDataBase dataDB,
int depth,
int column,
int lineId,
int parentRowId)
: base(parameters, results, reportStore, report, dataDB, depth, column, lineId, parentRowId)
{
}
开发者ID:Davincier,项目名称:openpetra,代码行数:24,代码来源:Evaluator.cs
示例14: SetControlsManual
private void SetControlsManual(TParameterList AParameters)
{
// param_reportday defines if the report is run on arrival or departuer days.
if (AParameters.Get("param_reportday").ToString() == "Arrival")
{
rbtArrival.Checked = true;
}
else if (AParameters.Get("param_reportday").ToString() == "Departure")
{
rbtDeparture.Checked = true;
}
}
开发者ID:Davincier,项目名称:openpetra,代码行数:12,代码来源:ArrivalListingReport.ManualCode.cs
示例15: RetrieveParameters
/// <summary>
/// retrieve parameters from client sent in AParameters and build up AParameterList to run SQL query
/// </summary>
/// <param name="AParameters"></param>
/// <param name="ASqlStmt"></param>
/// <param name="ASQLParameterList"></param>
protected override void RetrieveParameters(TParameterList AParameters, ref string ASqlStmt, ref List <OdbcParameter>ASQLParameterList)
{
// prepare list of selected events
List <String>param_events = new List <String>();
foreach (TVariant choice in AParameters.Get("param_events").ToComposite())
{
param_events.Add(choice.ToString());
}
if (param_events.Count == 0)
{
throw new NoNullAllowedException("At least one event must be checked.");
}
// prepare list of selected event roles (comes all in one comma separated string)
List <String>param_event_roles = new List <String>();
if (AParameters.Exists("param_event_roles"))
{
param_event_roles = new List <String>(AParameters.Get("param_event_roles").ToString().Split(','));
}
if (param_event_roles.Count == 0)
{
throw new NoNullAllowedException("At least one event role must be checked.");
}
// now add parameters to sql parameter list
ASQLParameterList.Add(TDbListParameterValue.OdbcListParameterValue("events", OdbcType.BigInt, param_events));
ASQLParameterList.Add(TDbListParameterValue.OdbcListParameterValue("event_roles", OdbcType.VarChar, param_event_roles));
ASQLParameterList.Add(new OdbcParameter("Accepted", OdbcType.Bit)
{
Value = AParameters.Get("param_status_accepted").ToBool()
});
ASQLParameterList.Add(new OdbcParameter("Hold", OdbcType.Bit)
{
Value = AParameters.Get("param_status_hold").ToBool()
});
ASQLParameterList.Add(new OdbcParameter("Enquiry", OdbcType.Bit)
{
Value = AParameters.Get("param_status_enquiry").ToBool()
});
ASQLParameterList.Add(new OdbcParameter("Cancelled", OdbcType.Bit)
{
Value = AParameters.Get("param_status_cancelled").ToBool()
});
ASQLParameterList.Add(new OdbcParameter("Rejected", OdbcType.Bit)
{
Value = AParameters.Get("param_status_rejected").ToBool()
});
}
开发者ID:Davincier,项目名称:openpetra,代码行数:58,代码来源:ExtractPartnerByEventRole.cs
示例16: TGridPreview
/// <summary>
/// constructor
/// </summary>
public TGridPreview(Form APreviewForm,
TFrmPetraUtils APetraUtilsObject,
TPreviewDelegate APreviewDelegate,
TResultList AResultList,
TParameterList AParameters)
{
results = AResultList.ConvertToFormattedStrings(AParameters);
FOrigParameters = AParameters;
parameters = AParameters.ConvertToFormattedStrings();
FPreviewForm = APreviewForm;
FPetraUtilsObject = APetraUtilsObject;
FPreviewDelegate = APreviewDelegate;
FGenerateReportThread = null;
}
开发者ID:Davincier,项目名称:openpetra,代码行数:17,代码来源:GridPreview.cs
示例17: TReportPrinterLayout
/// <summary>
/// constructor
/// </summary>
/// <param name="AResult"></param>
/// <param name="AParameters"></param>
/// <param name="APrinter"></param>
/// <param name="AWrapColumn">True: Wrap text in the column if it is to long. Otherwise cut it</param>
public TReportPrinterLayout(TResultList AResult, TParameterList AParameters, TPrinter APrinter, bool AWrapColumn) : base(AResult, AParameters,
APrinter)
{
FWrapColumn = AWrapColumn;
if (AParameters.Get("ReportWidth").ToDouble() > 20)
{
APrinter.Init(eOrientation.eLandscape, this, eMarginType.eDefaultMargins);
}
else
{
APrinter.Init(eOrientation.ePortrait, this, eMarginType.eDefaultMargins);
}
}
开发者ID:Davincier,项目名称:openpetra,代码行数:21,代码来源:PrinterLayout.cs
示例18: TestPartnerBySpecialTypes
public void TestPartnerBySpecialTypes()
{
CommonNUnitFunctions.ResetDatabase();
string testFile = "../../csharp/ICT/Testing/lib/MPartner/server/Reporting/TestData/PartnerBySpecialTypes.xml";
TParameterList SpecificParameters = new TParameterList();
SpecificParameters.Add("param_address_date_valid_on", new TVariant(new DateTime(DateTime.Today.Year, 1, 1)));
SpecificParameters.Add("param_explicit_specialtypes", new TVariant("LEDGER"));
TReportTestingTools.CalculateReport(testFile, SpecificParameters);
TReportTestingTools.TestResult(testFile);
}
开发者ID:Davincier,项目名称:openpetra,代码行数:14,代码来源:PartnerBySpecialTypes.test.cs
示例19: RunOnceOnActivationManual
private void RunOnceOnActivationManual()
{
if (CalledFromExtracts)
{
tabReportSettings.Controls.Remove(tpgColumns);
}
var addressSettings = new TParameterList();
addressSettings.Add("param_active", true);
addressSettings.Add("param_mailing_addresses_only", true);
addressSettings.Add("param_families_only", false);
addressSettings.Add("param_exclude_no_solicitations", true);
ucoChkFilter.SetControls(addressSettings);
}
开发者ID:Davincier,项目名称:openpetra,代码行数:14,代码来源:PartnerByContactLog.ManualCode.cs
示例20: RetrieveParameters
/// <summary>
/// retrieve parameters from client sent in AParameters and build up AParameterList to run SQL query
/// </summary>
/// <param name="AParameters"></param>
/// <param name="ASqlStmt"></param>
/// <param name="ASQLParameterList"></param>
protected override void RetrieveParameters(TParameterList AParameters, ref string ASqlStmt, ref List <OdbcParameter>ASQLParameterList)
{
bool AllLedgers;
ICollection <String>param_ledgers;
AllLedgers = AParameters.Get("param_all_ledgers").ToBool();
// now add parameters to sql parameter list
ASQLParameterList.Add(new OdbcParameter("param_all_ledgers", OdbcType.Bit)
{
Value = AllLedgers
});
if (AllLedgers)
{
// Add dummy value in case of an empty list so sql query does not fail.
// This value is irrelevant in this case.
ASQLParameterList.Add(new OdbcParameter("ledgers", OdbcType.BigInt)
{
Value = 0
});
}
else
{
// prepare list of ledgers
param_ledgers = AParameters.Get("param_ledgers").ToString().Split(new Char[] { ',', });
ASQLParameterList.Add(TDbListParameterValue.OdbcListParameterValue("ledgers", OdbcType.BigInt, param_ledgers));
}
ASQLParameterList.Add(new OdbcParameter("param_date_from_unset", OdbcType.Bit)
{
Value = AParameters.Get("param_date_from").IsZeroOrNull()
});
ASQLParameterList.Add(new OdbcParameter("param_date_from", OdbcType.Date)
{
Value = AParameters.Get("param_date_from").ToDate()
});
ASQLParameterList.Add(new OdbcParameter("param_date_to_unset", OdbcType.Bit)
{
Value = AParameters.Get("param_date_to").IsZeroOrNull()
});
ASQLParameterList.Add(new OdbcParameter("param_date_to", OdbcType.Date)
{
Value = AParameters.Get("param_date_to").ToDate()
});
}
开发者ID:Davincier,项目名称:openpetra,代码行数:54,代码来源:ExtractRecipientByField.cs
注:本文中的Ict.Petra.Shared.MReporting.TParameterList类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论