public string GetNameList() { string res = ""; SetValues(); foreach (object obj in _ParamTable) { ReportParameter param = (ReportParameter)obj; if (res == "") { res = param.Name; } else { res += ", " + param.Name; } } return(res); }
public void HashLoad(Hashtable paramlist) { foreach (string name in _ParamNames) { ReportParameter param = (ReportParameter)paramlist[name]; if (param != null) { param = (ReportParameter)paramlist[name]; _ParamTable[name] = param; } } dateEnd.Value = DateTime.Parse(((ReportParameter)_ParamTable["EndDate"]).ParamValue); dateStart.Value = DateTime.Parse(((ReportParameter)_ParamTable["StartDate"]).ParamValue); cbCompareWeek.SelectedIndex = int.Parse(((ReportParameter)_ParamTable["PeriodIndex"]).ParamValue); //mila: is it needed? or for some reports only? if (dateStart.Value.DayOfWeek.ToString() != VWA4Common.GlobalSettings.FirstDayOfWeek && (dateEnd.Value.Subtract(dateStart.Value).Days % 7 == 0)) { int diff = (DayOfWeek)DayOfWeek.Parse(typeof(DayOfWeek), VWA4Common.GlobalSettings.FirstDayOfWeek) - dateStart.Value.DayOfWeek; dateStart.Value = dateStart.Value.AddDays(diff); dateEnd.Value = dateEnd.Value.AddDays(diff); } }
public void AddItem(ReportParameter param) { _ParamTable.Add(param.Name, param); }