public ActionResult Edit(int id)
        {
            var context = new Context();

            if (!Request.IsAjaxRequest())
            {
                var log  = new SysLogModel(context: context);
                var html = DeptUtilities.Editor(
                    context: context,
                    ss: SiteSettingsUtilities.DeptsSiteSettings(context: context),
                    deptId: id,
                    clearSessions: true);
                ViewBag.HtmlBody = html;
                log.Finish(context: context, responseSize: html.Length);
                return(View());
            }
            else
            {
                var log  = new SysLogModel(context: context);
                var json = DeptUtilities.EditorJson(
                    context: context,
                    ss: SiteSettingsUtilities.DeptsSiteSettings(context: context),
                    deptId: id);
                log.Finish(context: context, responseSize: json.Length);
                return(Content(json));
            }
        }
        public string GridRows(Context context)
        {
            var log  = new SysLogModel(context: context);
            var json = DeptUtilities.GridRows(context: context);

            log.Finish(context: context, responseSize: json.Length);
            return(json);
        }
Esempio n. 3
0
        public string GridRows()
        {
            var log  = new SysLogModel();
            var json = DeptUtilities.GridRows();

            log.Finish(json.Length);
            return(json);
        }
Esempio n. 4
0
        public string Create()
        {
            var log  = new SysLogModel();
            var json = DeptUtilities.Create(
                ss: SiteSettingsUtilities.DeptsSiteSettings());

            log.Finish(json.Length);
            return(json);
        }
        public string New(Context context, long id = 0)
        {
            var log  = new SysLogModel(context: context);
            var html = DeptUtilities.EditorNew(
                context: context,
                ss: SiteSettingsUtilities.DeptsSiteSettings(context: context));

            log.Finish(context: context, responseSize: html.Length);
            return(html);
        }
Esempio n. 6
0
        public string History(int id)
        {
            var log  = new SysLogModel();
            var json = DeptUtilities.History(
                ss: SiteSettingsUtilities.DeptsSiteSettings(),
                deptId: id);

            log.Finish(json.Length);
            return(json);
        }
Esempio n. 7
0
        public ActionResult New(long id = 0)
        {
            var log  = new SysLogModel();
            var html = DeptUtilities.EditorNew(
                SiteSettingsUtilities.DeptsSiteSettings());

            ViewBag.HtmlBody = html;
            log.Finish(html.Length);
            return(View());
        }
Esempio n. 8
0
        public string DeleteComment(int id)
        {
            var log  = new SysLogModel();
            var json = DeptUtilities.Update(
                ss: SiteSettingsUtilities.DeptsSiteSettings(),
                deptId: id);

            log.Finish(json.Length);
            return(json);
        }
        public string Create(Context context)
        {
            var log  = new SysLogModel(context: context);
            var json = DeptUtilities.Create(
                context: context,
                ss: SiteSettingsUtilities.DeptsSiteSettings(context: context));

            log.Finish(context: context, responseSize: json.Length);
            return(json);
        }
        public string History(Context context, int id)
        {
            var log  = new SysLogModel(context: context);
            var json = DeptUtilities.History(
                context: context,
                ss: SiteSettingsUtilities.DeptsSiteSettings(context: context),
                deptId: id);

            log.Finish(context: context, responseSize: json.Length);
            return(json);
        }
        public string DeleteComment(int id)
        {
            var context = new Context();
            var log     = new SysLogModel(context: context);
            var json    = DeptUtilities.Update(
                context: context,
                ss: SiteSettingsUtilities.DeptsSiteSettings(context: context),
                deptId: id);

            log.Finish(context: context, responseSize: json.Length);
            return(json);
        }
        public ActionResult New(long id = 0)
        {
            var context = new Context();
            var log     = new SysLogModel(context: context);
            var html    = DeptUtilities.EditorNew(
                context: context,
                ss: SiteSettingsUtilities.DeptsSiteSettings(context: context));

            ViewBag.HtmlBody = html;
            log.Finish(context: context, responseSize: html.Length);
            return(View());
        }
        public ContentResult Get(Context context, int id)
        {
            var log    = new SysLogModel(context: context);
            var result = context.Authenticated
                ? DeptUtilities.GetByApi(
                context: context,
                ss: SiteSettingsUtilities.ApiDeptsSiteSettings(context),
                deptId: id)
                : ApiResults.Unauthorized(context: context);

            log.Finish(context: context, responseSize: result.Content.Length);
            return(result);
        }
Esempio n. 14
0
 public ActionResult Index()
 {
     if (!Request.IsAjaxRequest())
     {
         var log  = new SysLogModel();
         var html = DeptUtilities.Index(
             ss: SiteSettingsUtilities.DeptsSiteSettings());
         ViewBag.HtmlBody = html;
         log.Finish(html.Length);
         return(View());
     }
     else
     {
         var log  = new SysLogModel();
         var json = DeptUtilities.IndexJson(
             ss: SiteSettingsUtilities.DeptsSiteSettings());
         log.Finish(json.Length);
         return(Content(json));
     }
 }
        public List <ServerScriptModelUserModel> GetMembers()
        {
            var users = new List <ServerScriptModelUserModel>();

            DeptUtilities.Users(
                context: Context,
                deptId: DeptId)
            .ForEach(dataRow =>
                     users.Add(new ServerScriptModelUserModel(
                                   context: Context,
                                   tenantId: dataRow.Int("DeptId"),
                                   userId: dataRow.Int("UserId"),
                                   deptId: dataRow.Int("DeptId"),
                                   loginId: dataRow.String("LoginId"),
                                   name: dataRow.String("Name"),
                                   userCode: dataRow.String("UserCode"),
                                   tenantManager: dataRow.Bool("TenantManager"),
                                   serviceManager: dataRow.Bool("ServiceManager"),
                                   disabled: dataRow.Bool("Disabled"))));
            return(users);
        }
 public string Index(Context context)
 {
     if (!context.Ajax)
     {
         var log  = new SysLogModel(context: context);
         var html = DeptUtilities.Index(
             context: context,
             ss: SiteSettingsUtilities.DeptsSiteSettings(context: context));
         log.Finish(context: context, responseSize: html.Length);
         return(html);
     }
     else
     {
         var log  = new SysLogModel(context: context);
         var json = DeptUtilities.IndexJson(
             context: context,
             ss: SiteSettingsUtilities.DeptsSiteSettings(context: context));
         log.Finish(context: context, responseSize: json.Length);
         return(json);
     }
 }
Esempio n. 17
0
 public ActionResult Edit(int id)
 {
     if (!Libraries.Requests.Request.IsAjaxRequest(Request))
     {
         var log  = new SysLogModel();
         var html = DeptUtilities.Editor(
             SiteSettingsUtilities.DeptsSiteSettings(),
             id,
             clearSessions: true);
         ViewBag.HtmlBody = html;
         log.Finish(html.Length);
         return(View());
     }
     else
     {
         var log  = new SysLogModel();
         var json = DeptUtilities.EditorJson(
             ss: SiteSettingsUtilities.DeptsSiteSettings(),
             deptId: id);
         log.Finish(json.Length);
         return(Content(json));
     }
 }
 public string Edit(Context context, int id)
 {
     if (!context.Ajax)
     {
         var log  = new SysLogModel(context: context);
         var html = DeptUtilities.Editor(
             context: context,
             ss: SiteSettingsUtilities.DeptsSiteSettings(context: context),
             deptId: id,
             clearSessions: true);
         log.Finish(context: context, responseSize: html.Length);
         return(html);
     }
     else
     {
         var log  = new SysLogModel(context: context);
         var json = DeptUtilities.EditorJson(
             context: context,
             ss: SiteSettingsUtilities.DeptsSiteSettings(context: context),
             deptId: id);
         log.Finish(context: context, responseSize: json.Length);
         return(json);
     }
 }
        public ActionResult Index()
        {
            var context = new Context();

            if (!Request.IsAjaxRequest())
            {
                var log  = new SysLogModel(context: context);
                var html = DeptUtilities.Index(
                    context: context,
                    ss: SiteSettingsUtilities.DeptsSiteSettings(context: context));
                ViewBag.HtmlBody = html;
                log.Finish(context: context, responseSize: html.Length);
                return(View());
            }
            else
            {
                var log  = new SysLogModel(context: context);
                var json = DeptUtilities.IndexJson(
                    context: context,
                    ss: SiteSettingsUtilities.DeptsSiteSettings(context: context));
                log.Finish(context: context, responseSize: json.Length);
                return(Content(json));
            }
        }