728 lines
24 KiB
C#
728 lines
24 KiB
C#
|
|
|||
|
using Ease.Core.Model;
|
|||
|
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Data;
|
|||
|
using System.Linq;
|
|||
|
|
|||
|
namespace HRM.BO
|
|||
|
{
|
|||
|
#region ReportColumnDefinition
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Report
|
|||
|
/// Name, Description, Search-Condition, Report-Type ( Tabular, Aggregate, PVOT),sql, additionalWhereSQL,
|
|||
|
/// reportShareType(Mail,
|
|||
|
/// ReportColumn
|
|||
|
/// BDColumnID
|
|||
|
/// Alignment
|
|||
|
/// Width
|
|||
|
/// ReportSearchColumn
|
|||
|
/// ReportAuthorization
|
|||
|
/// EmployeeID
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
public class ReportColumnDefinition : BasicBaseObject
|
|||
|
{
|
|||
|
|
|||
|
#region Constructor
|
|||
|
|
|||
|
public ReportColumnDefinition()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
public string TableName { get; set; }
|
|||
|
public string TableColumnName { get; set; }
|
|||
|
public string ColumnName { get; set; }
|
|||
|
public string ColumnCode { get; set; }
|
|||
|
public ColumnDataTypeEnum DataType { get; set; }
|
|||
|
public bool UsedAsSearch { get; set; }
|
|||
|
|
|||
|
public string Aggregate { get; set; }
|
|||
|
|
|||
|
public OrderByEnum ColumnOrderBy { get; set; }
|
|||
|
public bool HasOrderBy { get; }
|
|||
|
public int OrderByValue { get; }
|
|||
|
public bool ColumnVisible { get; set; }
|
|||
|
public Grouping ObjectSUBGroup { get; set; }
|
|||
|
public int ObjectSUBGroupID { get; set; }
|
|||
|
public ObjectGrouping ObjectGroup { get; set; }
|
|||
|
public int ObjectGroupID { get; set; }
|
|||
|
public string Caption { get; set; }
|
|||
|
public decimal Width { get; set; }
|
|||
|
public ColumnAlignmentEnum Alignment { get; set; }
|
|||
|
|
|||
|
public int AlignmentValue { get; }
|
|||
|
|
|||
|
public string ValueFormat { get; set; }
|
|||
|
|
|||
|
|
|||
|
public bool IsThisPicker { get; set; }
|
|||
|
|
|||
|
public PickerTypeEnum PickerType { get; set; }
|
|||
|
|
|||
|
public string PickerTablesName { get; set; }
|
|||
|
|
|||
|
public string PickerColumnsName { get; set; }
|
|||
|
|
|||
|
public string ValueMemberColumnName { get; set; }
|
|||
|
|
|||
|
public string UserData { get; set; }
|
|||
|
|
|||
|
public string Operator { get; set; }
|
|||
|
|
|||
|
public string Values { get; set; }
|
|||
|
public string AssemblyName { get; set; }
|
|||
|
public string UDControlName { get; set; }
|
|||
|
public bool IsUDControl { get; set; }
|
|||
|
public int IDForSerialize { get; set; }
|
|||
|
public List<PickerDependancy> Dependancys { get; set; }
|
|||
|
public string WhereClauses { get; set; }
|
|||
|
//#region Picker Dependancies
|
|||
|
//private PickerDependancys _pickerdependancies = null;
|
|||
|
//public PickerDependancys Dependancys
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// if (_pickerdependancies == null)
|
|||
|
// {
|
|||
|
// _pickerdependancies = new PickerDependancys();
|
|||
|
// }
|
|||
|
// SetThisAsParentOf(_pickerdependancies);
|
|||
|
// return _pickerdependancies;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _pickerdependancies = value;
|
|||
|
// SetThisAsParentOf(_pickerdependancies);
|
|||
|
// base.SetObjectStateModified();
|
|||
|
// }
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
|
|||
|
//#region Functions
|
|||
|
//public void Save()
|
|||
|
//{
|
|||
|
// try
|
|||
|
// {
|
|||
|
// Service.Save(this);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new ServiceException(e.Message, e);
|
|||
|
// }
|
|||
|
//}
|
|||
|
//public void Delete()
|
|||
|
//{
|
|||
|
// try
|
|||
|
// {
|
|||
|
// Service.Delete(this.ID);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new ServiceException(e.Message, e);
|
|||
|
// }
|
|||
|
//}
|
|||
|
//public void Delete(ID columnID)
|
|||
|
//{
|
|||
|
// try
|
|||
|
// {
|
|||
|
// Service.Delete(columnID);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new ServiceException(e.Message, e);
|
|||
|
// }
|
|||
|
//}
|
|||
|
|
|||
|
//public ReportColumnDefinition Get(ID columnID)
|
|||
|
//{
|
|||
|
// ReportColumnDefinition item;
|
|||
|
|
|||
|
// #region CacheHeader
|
|||
|
// item = (ReportColumnDefinition)_cache["Get", columnID];
|
|||
|
// if (item != null)
|
|||
|
// return item;
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// item = Service.Get(columnID);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new ServiceException(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region CacheFooter
|
|||
|
// _cache.Add(item, "Get", columnID);
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return item;
|
|||
|
//}
|
|||
|
//public ReportColumnDefinition Get()
|
|||
|
//{
|
|||
|
// ReportColumnDefinition item;
|
|||
|
|
|||
|
// #region CacheHeader
|
|||
|
// item = (ReportColumnDefinition)_cache["Get", this.ID];
|
|||
|
// if (item != null)
|
|||
|
// return item;
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// item = Service.Get(this.ID);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new ServiceException(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region CacheFooter
|
|||
|
// _cache.Add(item, "Get", this.ID);
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return item;
|
|||
|
//}
|
|||
|
//private Type _sysdataType;
|
|||
|
//public void SetSystemDatatype(Type type)
|
|||
|
//{
|
|||
|
// _sysdataType = type;
|
|||
|
//}
|
|||
|
|
|||
|
///// <summary>
|
|||
|
///// Used only for picker
|
|||
|
///// </summary>
|
|||
|
///// <returns>Data Table</returns>
|
|||
|
//public DataTable GetPickerData()
|
|||
|
//{
|
|||
|
// DataTable dt;
|
|||
|
// try
|
|||
|
// {
|
|||
|
// if (this.PickerType == PickerTypeEnum.None)
|
|||
|
// throw new ServiceException("Invalid user of picker data.");
|
|||
|
|
|||
|
// if (this.PickerType == PickerTypeEnum.Table)
|
|||
|
// {
|
|||
|
// string sql = string.Format("SELECT Distinct {0}, {1} FROM {2} {3}", this.ValueMemberColumnName, this.PickerColumnsName, this.PickerTablesName, this._sWhereClause);
|
|||
|
// dt = ColumnDefinition.Service.Get(sql);
|
|||
|
// }
|
|||
|
// else if (this.PickerType == PickerTypeEnum.ManualSQL)
|
|||
|
// {
|
|||
|
// string str = this.UserData;
|
|||
|
// if (str.ToLower().Contains("where") && this.WhereClauses.ToString() != String.Empty)
|
|||
|
// {
|
|||
|
// str = str.ToLower().Replace("where", this._sWhereClause + " and");
|
|||
|
|
|||
|
// }
|
|||
|
|
|||
|
// else
|
|||
|
// {
|
|||
|
// str = str + this._sWhereClause;
|
|||
|
// }
|
|||
|
// dt = ColumnDefinition.Service.Get(str);
|
|||
|
// }
|
|||
|
// else
|
|||
|
// {
|
|||
|
// dt = new DataTable("Picker");
|
|||
|
// DataColumn col = new DataColumn("Show", typeof(bool));
|
|||
|
// dt.Columns.Add(col);
|
|||
|
|
|||
|
// col = new DataColumn("Value", typeof(int));
|
|||
|
// dt.Columns.Add(col);
|
|||
|
|
|||
|
// col = new DataColumn("Name", typeof(string));
|
|||
|
// dt.Columns.Add(col);
|
|||
|
|
|||
|
// string[] tokens = this.UserData.Split(';');
|
|||
|
// foreach (string token in tokens)
|
|||
|
// {
|
|||
|
// string[] segs = token.Split('=');
|
|||
|
// if (segs == null || segs.Length != 2)
|
|||
|
// continue;
|
|||
|
|
|||
|
// int val = Convert.ToInt32(segs[1]);
|
|||
|
// dt.Rows.Add(0, val, segs[0]);
|
|||
|
// }
|
|||
|
// }
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new ServiceException(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// return dt;
|
|||
|
//}
|
|||
|
////for userdefined control
|
|||
|
//public IUDControl GetUDControl()
|
|||
|
//{
|
|||
|
// IUDControl ctl = null;
|
|||
|
// if (this.IsUDControl)
|
|||
|
// {
|
|||
|
// System.Reflection.Assembly ass = System.Reflection.Assembly.LoadFrom(Environment.CurrentDirectory + "\\" + _assemblyName);
|
|||
|
// Type tye = ass.GetType(_udControlName);
|
|||
|
|
|||
|
// System.Reflection.ConstructorInfo cInfo = tye.GetConstructor(new Type[] { });
|
|||
|
// ctl = (IUDControl)cInfo.Invoke(null);
|
|||
|
// //ctl = (IUDControl)Activator.CreateInstance(tye);
|
|||
|
// }
|
|||
|
// return ctl;
|
|||
|
//}
|
|||
|
|
|||
|
//internal string GenSQL()
|
|||
|
//{
|
|||
|
// //If column type is output just return empty
|
|||
|
// if (!this.UsedAsSearch)
|
|||
|
// return string.Empty;
|
|||
|
// //Added by hasib
|
|||
|
// if (IsUDControl)
|
|||
|
// {
|
|||
|
// string ctlsql = string.Empty;
|
|||
|
// string valuestring = this.Values;//GetUDControl().GetValueString();
|
|||
|
// if (valuestring != string.Empty)
|
|||
|
// ctlsql = string.Format("{0}.{1} IN ({2})", this.TableName, this.ColumnName, this.Values);
|
|||
|
// return ctlsql;
|
|||
|
// }
|
|||
|
// //If no file is used return empty
|
|||
|
// if (this.Operator.ToLower().IndexOf("no filter") != -1 || this.Values.Length <= 0)
|
|||
|
// return string.Empty;
|
|||
|
|
|||
|
// switch (this.DataType)
|
|||
|
// {
|
|||
|
// case ColumnDataTypeEnum.String:
|
|||
|
// //If using in/not in operator
|
|||
|
// if (this.Operator.ToLower().IndexOf("in") != -1)
|
|||
|
// {
|
|||
|
// if (this.Values.Contains("'"))
|
|||
|
// this.Values = this.Values.Replace("'", "''");
|
|||
|
// string vals = string.Empty;
|
|||
|
// string[] tokens = this.Values.Split(',');
|
|||
|
// foreach (string token in tokens)
|
|||
|
// {
|
|||
|
// vals += vals.Length > 0 ? ", " : "";
|
|||
|
// vals += string.Format("'{0}'", token.Trim());
|
|||
|
// }
|
|||
|
|
|||
|
// return this.GetForInSQL(vals);
|
|||
|
// }
|
|||
|
// //If using like operator
|
|||
|
// else if (this.Operator.ToLower().IndexOf("like") != -1)
|
|||
|
// {
|
|||
|
// return this.GetForLikeSQL(this.Values);
|
|||
|
// }
|
|||
|
// //All other operators
|
|||
|
// else
|
|||
|
// {
|
|||
|
// string vals = string.Format("'{0}'", this.Values);
|
|||
|
// return this.GetForOthersSQL(vals);
|
|||
|
// }
|
|||
|
|
|||
|
// case ColumnDataTypeEnum.Numeric:
|
|||
|
// //If using in/not in operator
|
|||
|
// if (this.Operator.ToLower().IndexOf("in") != -1)
|
|||
|
// {
|
|||
|
// return this.GetForInSQL(this.Values);
|
|||
|
// }
|
|||
|
// //If using between operator
|
|||
|
// else if (this.Operator.ToLower().IndexOf("between") != -1)
|
|||
|
// {
|
|||
|
// string[] tokens = this.Values.Split(';');
|
|||
|
// string vals = string.Format("{0} AND {1}", tokens[0].Trim(), tokens[1].Trim());
|
|||
|
// return this.GetForOthersSQL(vals);
|
|||
|
// }
|
|||
|
// //All other operators
|
|||
|
// else
|
|||
|
// {
|
|||
|
// return this.GetForOthersSQL(this.Values);
|
|||
|
// }
|
|||
|
// case ColumnDataTypeEnum.DateTime:
|
|||
|
// //If using in/not in operator
|
|||
|
// if (this.Operator.ToLower().IndexOf("in") != -1)
|
|||
|
// {
|
|||
|
// string vals = string.Empty;
|
|||
|
// string[] tokens = this.Values.Split(',');
|
|||
|
// foreach (string token in tokens)
|
|||
|
// {
|
|||
|
// vals += vals.Length > 0 ? ", " : "";
|
|||
|
// int n = token.Trim().IndexOf(' ');
|
|||
|
// string ss = Convert.ToDateTime(token.Trim().Remove(n)).ToString("dd MMM yyyy");
|
|||
|
// vals += string.Format("'{0}'", ss);
|
|||
|
// }
|
|||
|
|
|||
|
// return this.GetForInSQL(vals);
|
|||
|
// }
|
|||
|
// //If using between operator
|
|||
|
// else if (this.Operator.ToLower().IndexOf("between") != -1)
|
|||
|
// {
|
|||
|
// string[] tokens = this.Values.Split(';');
|
|||
|
// string vals = string.Format("'{0}' AND '{1}'", tokens[0].Trim(), tokens[1].Trim());
|
|||
|
// return this.GetForOthersSQL(vals);
|
|||
|
// }
|
|||
|
// //All other operators
|
|||
|
// else
|
|||
|
// {
|
|||
|
// string vals = string.Format("'{0}'", this.Values);
|
|||
|
// return this.GetForOthersSQL(vals);
|
|||
|
// }
|
|||
|
|
|||
|
// default:
|
|||
|
// break;
|
|||
|
// }
|
|||
|
|
|||
|
// return string.Empty;
|
|||
|
//}
|
|||
|
//internal string GenSearchString()
|
|||
|
//{
|
|||
|
// //If column type is output just return empty
|
|||
|
// if (!this.UsedAsSearch)
|
|||
|
// return string.Empty;
|
|||
|
|
|||
|
// //Added by Hasib 28.02.10 For User Defined Control
|
|||
|
// //if (IsUDControl)
|
|||
|
// //{
|
|||
|
// // string valuestring = GetUDControl().GetValueString();
|
|||
|
// // if(valuestring != string.Empty)
|
|||
|
// // return valuestring;
|
|||
|
// //}
|
|||
|
// //end
|
|||
|
// //If no file is used return empty
|
|||
|
// if (this.Operator.ToLower().IndexOf("no filter") != -1 || this.Values.Length <= 0)
|
|||
|
// return string.Empty;
|
|||
|
|
|||
|
|
|||
|
// switch (this.DataType)
|
|||
|
// {
|
|||
|
// case ColumnDataTypeEnum.String:
|
|||
|
// //If using in/not in operator
|
|||
|
// if (this.Operator.ToLower().IndexOf("in") != -1)
|
|||
|
// {
|
|||
|
// string vals = this.TableName + ":" + this.Values;
|
|||
|
// return vals;
|
|||
|
// }
|
|||
|
// //If using like operator
|
|||
|
// else if (this.Operator.ToLower().IndexOf("like") != -1)
|
|||
|
// {
|
|||
|
// return this.GetForLikeSQL(this.Values);
|
|||
|
// }
|
|||
|
// //All other operators
|
|||
|
// else
|
|||
|
// {
|
|||
|
// string vals = string.Format("'{0}'", this.Values);
|
|||
|
// return this.GetForOthersSQL(vals);
|
|||
|
// }
|
|||
|
|
|||
|
// case ColumnDataTypeEnum.Numeric:
|
|||
|
// //If using in/not in operator
|
|||
|
// if (this.Operator.ToLower().IndexOf("in") != -1)
|
|||
|
// {
|
|||
|
// string vals = this.ColumnName + ":" + this.Values;
|
|||
|
// return vals;
|
|||
|
// }
|
|||
|
// //If using between operator
|
|||
|
// else if (this.Operator.ToLower().IndexOf("between") != -1)
|
|||
|
// {
|
|||
|
// string[] tokens = this.Values.Split(';');
|
|||
|
// string vals = this.ColumnName + ":" + string.Format("{0} AND {1}", tokens[0].Trim(), tokens[1].Trim());
|
|||
|
// return vals;
|
|||
|
// }
|
|||
|
// //All other operators
|
|||
|
// else
|
|||
|
// {
|
|||
|
// string vals = this.ColumnName + ": " + this.Values;
|
|||
|
// return vals;
|
|||
|
// }
|
|||
|
// case ColumnDataTypeEnum.DateTime:
|
|||
|
// //If using in/not in operator
|
|||
|
// if (this.Operator.ToLower().IndexOf("in") != -1)
|
|||
|
// {
|
|||
|
// string vals = string.Empty;
|
|||
|
// vals = this.ColumnName + ":" + this.Values;
|
|||
|
// return vals;
|
|||
|
// }
|
|||
|
// //If using between operator
|
|||
|
// else if (this.Operator.ToLower().IndexOf("between") != -1)
|
|||
|
// {
|
|||
|
// string[] tokens = this.Values.Split(';');
|
|||
|
// string vals = this.ColumnName + ":" + string.Format("'{0}' AND '{1}'", tokens[0].Trim(), tokens[1].Trim());
|
|||
|
// return vals;
|
|||
|
// }
|
|||
|
// //All other operators
|
|||
|
// else
|
|||
|
// {
|
|||
|
// string vals = this.ColumnName + ":" + this.Values;
|
|||
|
// return vals;
|
|||
|
// }
|
|||
|
|
|||
|
// default:
|
|||
|
// break;
|
|||
|
// }
|
|||
|
|
|||
|
// return string.Empty;
|
|||
|
//}
|
|||
|
//string GetForInSQL(string values)
|
|||
|
//{
|
|||
|
// //shakib
|
|||
|
// //return string.Format("{0}.{1} {2} ({3})", this.TableName, this.ColumnName, this.Operator, values);
|
|||
|
// if (this.PickerType != PickerTypeEnum.UserDefined)
|
|||
|
// {
|
|||
|
// return string.Format("{0}.{1} {2} ({3})", this.TableName, this.ValueMemberColumnName, this.Operator, values);
|
|||
|
// }
|
|||
|
// else
|
|||
|
// {
|
|||
|
// return string.Format("{0}.{1} {2} ({3})", this.TableName, this.ColumnName, this.Operator, values);
|
|||
|
// }
|
|||
|
//}
|
|||
|
//string GetForLikeSQL(string values)
|
|||
|
//{
|
|||
|
// return string.Format("{0}.{1} {2} '%{3}%'", "[" + this.TableName + "]", this.ColumnName, this.Operator, values);
|
|||
|
//}
|
|||
|
//string GetForOthersSQL(string values)
|
|||
|
//{
|
|||
|
// string s = string.Format("{0}.{1} {2} {3}", this.TableName, this.ColumnName, this.Operator, values);
|
|||
|
// return s;
|
|||
|
//}
|
|||
|
|
|||
|
//#endregion
|
|||
|
|
|||
|
//#region Service Factory IReportColumnDefinitionService : IReportColumnDefinitionService
|
|||
|
//internal static IReportColumnDefinitionService Service
|
|||
|
//{
|
|||
|
// get { return (IReportColumnDefinitionService)LocalFactory.Facory.CreateService(typeof(IReportColumnDefinitionService)); }
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
#region Report Column Definition collection
|
|||
|
|
|||
|
public class ReportColumnDefinitionCollection : BasicBaseObject
|
|||
|
{
|
|||
|
|
|||
|
#region Constructor
|
|||
|
public ReportColumnDefinitionCollection()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
//#region Inherited Functions
|
|||
|
//public void Add(ReportColumnDefinition item)
|
|||
|
//{
|
|||
|
// base.AddItem(item);
|
|||
|
//}
|
|||
|
|
|||
|
//public ReportColumnDefinition this[ID id]
|
|||
|
//{
|
|||
|
// get { return (ReportColumnDefinition)base.GetItem(id); }
|
|||
|
//}
|
|||
|
|
|||
|
//public ReportColumnDefinition this[ReportColumnDefinition item]
|
|||
|
//{
|
|||
|
// get { return (ReportColumnDefinition)base.GetItem(item); }
|
|||
|
//}
|
|||
|
|
|||
|
//public ReportColumnDefinition this[int index]
|
|||
|
//{
|
|||
|
// get { return (ReportColumnDefinition)base.InnerList[index]; }
|
|||
|
//}
|
|||
|
|
|||
|
//public ReportColumnDefinition this[string code]
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// foreach (ReportColumnDefinition oItem in this)
|
|||
|
// {
|
|||
|
// if (oItem.ColumnCode == code)
|
|||
|
// {
|
|||
|
// return oItem;
|
|||
|
// }
|
|||
|
// }
|
|||
|
// return null;
|
|||
|
// }
|
|||
|
//}
|
|||
|
|
|||
|
//public bool IsExist(string code)
|
|||
|
//{
|
|||
|
// foreach (ReportColumnDefinition oItem in this)
|
|||
|
// {
|
|||
|
// if (oItem.ColumnCode == code)
|
|||
|
// {
|
|||
|
// return true;
|
|||
|
// }
|
|||
|
// }
|
|||
|
// return false;
|
|||
|
//}
|
|||
|
|
|||
|
//public int GetItemIndex(ID id)
|
|||
|
//{
|
|||
|
// return base.GetIndex(id);
|
|||
|
//}
|
|||
|
|
|||
|
//public int GetItemIndex(ReportColumnDefinition item)
|
|||
|
//{
|
|||
|
// return base.GetIndex(item.ID);
|
|||
|
//}
|
|||
|
|
|||
|
//public void Remove(ReportColumnDefinition item)
|
|||
|
//{
|
|||
|
// base.RemoveItem(item);
|
|||
|
//}
|
|||
|
//public void Remove(string code)
|
|||
|
//{
|
|||
|
// base.RemoveItem(this[code]);
|
|||
|
//}
|
|||
|
|
|||
|
//public string GetSearchString(ReportColumnDefinitionCollection srcs)
|
|||
|
//{
|
|||
|
// string sSearchString = "Search Criteria:";
|
|||
|
// int nCount = 0;
|
|||
|
// foreach (ReportColumnDefinition rc in srcs)
|
|||
|
// {
|
|||
|
// string s = rc.GenSearchString();
|
|||
|
// if (s.Length <= 0)
|
|||
|
// continue;
|
|||
|
// nCount = nCount + 1;
|
|||
|
// sSearchString = sSearchString + s + "; ";
|
|||
|
// }
|
|||
|
// sSearchString = (nCount > 1) ? sSearchString.Substring(0, sSearchString.Length - 2) : "";
|
|||
|
// return sSearchString;
|
|||
|
//}
|
|||
|
|
|||
|
//#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
public DataTable ColumnsList { get; set; }
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
//#region Functions
|
|||
|
|
|||
|
//public static ReportColumnDefinitionCollection Get()
|
|||
|
//{
|
|||
|
// ReportColumnDefinitionCollection items;
|
|||
|
|
|||
|
// #region CacheHeader
|
|||
|
// items = (ReportColumnDefinitionCollection)_cache["Get"];
|
|||
|
// if (items != null)
|
|||
|
// return items;
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// items = ReportColumnDefinition.Service.Get();
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new ServiceException(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region CacheFooter
|
|||
|
// _cache.Add(items, "Get");
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return items;
|
|||
|
//}
|
|||
|
|
|||
|
//public static ReportColumnDefinitionCollection SearchRCD(string sSearchString)
|
|||
|
//{
|
|||
|
// ReportColumnDefinitionCollection items;
|
|||
|
|
|||
|
// #region CacheHeader
|
|||
|
// items = (ReportColumnDefinitionCollection)_cache["SearchRCD", sSearchString];
|
|||
|
// if (items != null)
|
|||
|
// return items;
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// items = ReportColumnDefinition.Service.SearchRCD(sSearchString);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new ServiceException(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region CacheFooter
|
|||
|
// _cache.Add(items, "SearchRCD", sSearchString);
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return items;
|
|||
|
//}
|
|||
|
|
|||
|
//public static ReportColumnDefinitionCollection Get(ID subGroupID)
|
|||
|
//{
|
|||
|
// ReportColumnDefinitionCollection items;
|
|||
|
|
|||
|
// #region CacheHeader
|
|||
|
// items = (ReportColumnDefinitionCollection)_cache["Get", subGroupID];
|
|||
|
// if (items != null)
|
|||
|
// return items;
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// items = ReportColumnDefinition.Service.GetBySubGroup(subGroupID);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new ServiceException(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region CacheFooter
|
|||
|
// _cache.Add(items, "Get", subGroupID);
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return items;
|
|||
|
//}
|
|||
|
//public static ReportColumnDefinitionCollection GetByReport(ID reportID)
|
|||
|
//{
|
|||
|
// ReportColumnDefinitionCollection items;
|
|||
|
|
|||
|
// #region CacheHeader
|
|||
|
// items = (ReportColumnDefinitionCollection)_cache["Get", reportID];
|
|||
|
// if (items != null)
|
|||
|
// return items;
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// items = ReportColumnDefinition.Service.GetByReport(reportID);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new ServiceException(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region CacheFooter
|
|||
|
// _cache.Add(items, "Get", reportID);
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return items;
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
//#region Interface
|
|||
|
//public interface IReportColumnDefinitionService
|
|||
|
//{
|
|||
|
// void Save(ReportColumnDefinition rC);
|
|||
|
// void Delete(ID columnID);
|
|||
|
// void SetIDOfAllItem(IndexedBusinessObjects objects);
|
|||
|
|
|||
|
// ReportColumnDefinition Get(ID columnID);
|
|||
|
// ReportColumnDefinitionCollection Get();
|
|||
|
// ReportColumnDefinitionCollection SearchRCD(string sSearch);
|
|||
|
// ReportColumnDefinitionCollection GetBySubGroup(ID subGroupID);
|
|||
|
// ReportColumnDefinitionCollection GetByReport(ID reportID);
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
#endregion
|
|||
|
}
|