public DataSet GetReportObject(MenuOption report, IList<String> rpParams, Location location)
        {
            //obtine el extension de ese menu.
            MenuOptionExtension moe;
            try
            {
                 moe = Factory.DaoMenuOptionExtension().Select(new MenuOptionExtension { MenuOption = report }).First();
            }
            catch
            {
                throw new Exception("No query extension defined for this report.");
            }

            string selectQuery = moe.Custom1;
            selectQuery= selectQuery.Replace("__LOCATION", location.LocationID.ToString());

            String[] colList = moe.Custom2.Split(',');

            IList<Object[]> list = Factory.DaoMenuOptionExtension().GetReportObject(selectQuery, rpParams);

            if (list == null || list.Count == 0)
                return null;

           DataTable dt = GetDataTableSchema(colList, "dt0", list);

           DataSet ds = new DataSet("dsResult");
           ds.Tables.Add(dt);
           return ds;

        }
Beispiel #2
0
        public IList<MenuOption> Select(MenuOption data)
        {

                IList<MenuOption> datos = new List<MenuOption>();
                datos = GetHsql(data).List<MenuOption>();
                if (!Factory.IsTransactional)
                    Factory.Commit();
                return datos;
           
        }
Beispiel #3
0
 public void DeleteMenuOption(MenuOption data) { Factory.DaoMenuOption().Delete(data); }
Beispiel #4
0
 public void UpdateMenuOption(MenuOption data) { Factory.DaoMenuOption().Update(data); }
Beispiel #5
0
 public MenuOption SaveMenuOption(MenuOption data) { return Factory.DaoMenuOption().Save(data); }
Beispiel #6
0
 public IList<MenuOption> GetMenuOption(MenuOption data) { return Factory.DaoMenuOption().Select(data); }
Beispiel #7
0
 public DataSet GetReportObject(MenuOption option, IList<String> rpParams, Location location)
 {
     return RptMngr.GetReportObject(option, rpParams, location);
 }
Beispiel #8
0
 public MenuOption SelectById(MenuOption data) 
 {
     return (MenuOption)base.SelectById(data);
 }
Beispiel #9
0
 public Boolean Delete(MenuOption data)
 {
     return base.Delete(data);
 }
Beispiel #10
0
 public Boolean Update(MenuOption data)
 {
     return base.Update(data);
 }
Beispiel #11
0
 public MenuOption Save(MenuOption data)
 {
     return (MenuOption)base.Save(data);
 }