示例#1
0
        } //End public static Boolean isValidSYSDATE(ActionExecutedContext context)

        public static void AutocreateYear(ActionExecutedContext context)
        {
            try {
                SysinfoDS oDSSysinfo = new SysinfoDS();
                YearDS    oDSYear    = new YearDS();
                var       oData      = oDSYear.getData_byPeriod(oDSSysinfo.getSYSDATE());



                if (oData == null)
                {
                    YearCRUD oCRUD = new YearCRUD();
                    oCRUD.Create();
                }
                else if (oData.ID == null)
                {
                    YearCRUD oCRUD = new YearCRUD();
                    oCRUD.Create();
                } //End if (oData.ID == null)
            }     //End try
            catch (Exception e) { }
        }         //End public static void AutocreateYear(ActionExecutedContext context)
示例#2
0
        } //End public static Boolean isLoggedin(ActionExecutedContext context)

        public static Boolean isValidSYSDATE(ActionExecutedContext context)
        {
            Boolean vReturn = true;

            try
            {
                DateTime?DBSysdate  = new SysinfoDS().getData().SYSDATE.Value.Date;
                DateTime?APPSysdate = DateTime.Now.Date;
                if (DBSysdate != APPSysdate)
                {
                    vReturn        = false;
                    context.Result = new RedirectToRouteResult(new RouteValueDictionary
                    {
                        { "controller", "Error" },
                        { "action", "ErrorSYSDATE" }
                    }); //End context.Result = new RedirectToRouteResult(new RouteValueDictionary
                } //End if (DBSysdate != APPSysdate)
            } //End try
            catch (Exception e) { }

            return(vReturn);
        } //End public static Boolean isValidSYSDATE(ActionExecutedContext context)