public static void IsPosibleDelete(long oid) { QueryConditions conditions = new QueryConditions { WorkReportCategory = WorkReportCategoryInfo.New(oid), }; }
protected void CopyValues(WorkReportCategoryInfo source) { if (source == null) { return; } _base.CopyValues(source); }
public void CopyValues(WorkReportCategoryInfo source) { if (source == null) { return; } _record.CopyValues(source.Base.Record); }
protected virtual void CopyFrom(WorkReportCategoryInfo source) { if (source == null) { return; } Oid = source.Oid; Name = source.Name; Comments = source.Comments; }
public static WorkReportCategory CloneAsNew(WorkReportCategoryInfo source) { WorkReportCategory clon = WorkReportCategory.New();; clon.Base.CopyValues(source); clon.Oid = (new Random()).Next(); clon.MarkNew(); return(clon); }
public static WorkReportResourceList GetByCategoryList(long oidCategory, List <long> oidExpedients, bool clustered, bool childs = true) { QueryConditions conditions = new QueryConditions { OidList = oidExpedients, WorkReportCategory = (oidCategory != 0) ? WorkReportCategoryInfo.New(oidCategory) : null, Orders = new OrderList() }; conditions.Orders.NewOrder("CategoryMax", ListSortDirection.Ascending, typeof(WorkReportCategory)); if (clustered) { conditions.Groups = new GroupList(); conditions.Groups.NewGroup("OidCategory", typeof(WorkReportResource)); } return(GetList(WorkReportResource.SELECT_BY_EXPEDIENTS(conditions, false), childs)); }
public static WorkReportResourceList GetByCategoryList(long oidCategory, long oidExpedient, bool clustered, bool childs = true) { QueryConditions conditions = new QueryConditions { Expedient = (oidExpedient != 0) ? ExpedientInfo.New(oidExpedient) : null, WorkReportCategory = (oidCategory != 0) ? WorkReportCategoryInfo.New(oidCategory) : null, Orders = new OrderList() }; conditions.Orders.NewOrder("CategoryMax", ListSortDirection.Ascending, typeof(WorkReportCategory)); if (clustered) { conditions.Groups = new GroupList(); conditions.Groups.NewGroup("OidCategory", typeof(WorkReportResource)); } return(GetList(SELECT(conditions), childs)); }
/*private static void FormatReport(WorkReportCategoryRpt rpt, string logo) * { * string path = Images.GetRootPath() + "\\" + Resources.Paths.LOGO_EMPRESAS + logo; * * if (File.Exists(path)) * { * Image image = Image.FromFile(path); * int width = rpt.Section1.ReportObjects["Logo"].Width; * int height = rpt.Section1.ReportObjects["Logo"].Height; * * rpt.Section1.ReportObjects["Logo"].Width = 15 * image.Width; * rpt.Section1.ReportObjects["Logo"].Height = 15 * image.Height; * rpt.Section1.ReportObjects["Logo"].Left += (width - 15 * image.Width) / 2; * rpt.Section1.ReportObjects["Logo"].Top += (height - 15 * image.Height) / 2; * } * }*/ #endregion #region Business Methods WorkReportCategory public WorkReportCategoryRpt GetDetailReport(WorkReportCategoryInfo item) { if (item == null) { return(null); } WorkReportCategoryRpt doc = new WorkReportCategoryRpt(); List <WorkReportCategoryPrint> pList = new List <WorkReportCategoryPrint>(); pList.Add(WorkReportCategoryPrint.New(item)); doc.SetDataSource(pList); doc.SetParameterValue("Empresa", Schema.Name); //FormatReport(doc, empresa.Logo); return(doc); }
internal static string SELECT(long oid, bool lockTable) { return(SELECT(new QueryConditions { WorkReportCategory = WorkReportCategoryInfo.New(oid) }, lockTable)); }