本文整理汇总了C#中Ict.Petra.Shared.MReporting.TParameterList类的典型用法代码示例。如果您正苦于以下问题:C# TParameterList类的具体用法?C# TParameterList怎么用?C# TParameterList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TParameterList类属于Ict.Petra.Shared.MReporting命名空间,在下文中一共展示了TParameterList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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);
}
示例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);
}
示例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()
});
}
示例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;
}
示例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);
}
示例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()
});
}
示例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);
}
示例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);
}
示例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);
}
示例11: SetControlsManual
private void SetControlsManual(TParameterList AParameters)
{
String CountryCode = AParameters.Get("param_country_code").ToString();
if ((CountryCode.Length > 0)
&& (CountryCode != "*"))
{
cmbCountry.SetSelectedString(CountryCode);
}
}
示例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);
}
示例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)
{
}
示例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;
}
}
示例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()
});
}