public string TestSequences()
        {
            DataAccessMgr    daMgr    = Global.GetDataAccessMgr(this.HttpContext);
            B1SampleEntities entities = new B1SampleEntities();
            var query = from a in entities.TestSequences
                        orderby new { a.AppSequenceName, a.AppSequenceId }
            select new { a.AppSequenceId, a.AppSequenceName, a.DbSequenceId };
            PagingMgr testSequenceMgr = new PagingMgr(daMgr, query, DataAccess.Constants.PageSize, 20);

            return(testSequenceMgr.ToHtmlString(this));
        }
        public ActionResult UserSessions()
        {
            B1SampleEntities entities = new B1SampleEntities();
            DataAccessMgr    daMgr    = Global.GetDataAccessMgr(this.HttpContext);

            var query = from a in entities.UserSessions
                        select new { a.AppCode, a.UserId };
            DbCommand dbCmd = daMgr.BuildSelectDbCommand(query, null);

            return(PartialView("_UserSessions", daMgr.ExecuteCollection <UserSession>(dbCmd, null)));
        }
        public ActionResult TestSequences2()
        {
            DataAccessMgr    daMgr    = Global.GetDataAccessMgr(this.HttpContext);
            B1SampleEntities entities = new B1SampleEntities();
            var query = from a in entities.TestSequences
                        orderby new { a.AppSequenceName, a.AppSequenceId }
            select new { a.AppSequenceId, a.AppSequenceName, a.DbSequenceId };
            PagingMgr testSequenceMgr = new PagingMgr(daMgr, query, DataAccess.Constants.PageSize, 10);

            return(PartialView(Constants._Page_PagingMgrView, testSequenceMgr));
        }
Exemplo n.º 4
0
        private void TestSequenceButton_Click(object sender, RoutedEventArgs e)
        {
            DataAccessMgr    daMgr    = new DataAccessMgr(ConfigurationManager.AppSettings["ConnectionKey"]);
            B1SampleEntities entities = new B1SampleEntities();
            var query = from a in entities.TestSequences
                        orderby new { a.AppSequenceName, a.AppSequenceId }
            select new { a.AppSequenceId, a.AppSequenceName, a.DbSequenceId };

            MainGridControl.PagingMgr = new PagingMgr(daMgr, query, DataAccess.Constants.PageSize, 10);
            MainGridControl.SetPage(PagingMgr.PagingDbCmdEnum.First);
        }
        public ActionResult UserEditForm(int userCode)
        {
            B1SampleEntities entities = new B1SampleEntities();
            DataAccessMgr    daMgr    = Global.GetDataAccessMgr(this.HttpContext);

            var query = from a in entities.UserMasters
                        where a.UserCode == userCode
                        select new { a.UserCode, a.UserId, a.FirstName };
            DbCommand dbCmd = daMgr.BuildSelectDbCommand(query, null);

            return(PartialView(Constants._Page_UserEdit, daMgr.ExecuteCollection <UserMaster>(dbCmd, null).First()));
        }
        //?? public ActionResult AppSessions()
        public string AppSessions()
        {
            B1SampleEntities entities = new B1SampleEntities();
            DataAccessMgr    daMgr    = Global.GetDataAccessMgr(this.HttpContext);

            var query = from a in entities.AppSessions
                        orderby new { a.AppCode, a.MultipleSessionCode }
            select new { a.AppCode, a.AppId, a.MultipleSessionCode };
            PagingMgr testSequenceMgr = new PagingMgr(daMgr, query, DataAccess.Constants.PageSize, 20);

            return(testSequenceMgr.ToHtmlString <AppSession>(PagingMgr.PagingDbCmdEnum.First).ToHtmlString());
            //DbCommand dbCmd = daMgr.BuildSelectDbCommand(query, null);
            //return PartialView("_AppSessions", daMgr.ExecuteCollection<AppSession>(dbCmd, null));
        }