Beispiel #1
0
        public static string TestInsert(string json)
        {
            var td = new TemplateDal();

            td.TestInsert();
            return(json);
        }
Beispiel #2
0
        /// <summary>
        /// 获取商城模板信息
        /// </summary>
        /// <param name="entId">企业Id</param>
        /// <param name="htmlType">html页面类型</param>
        /// <returns></returns>
        public JsonResult HtmlTemplate(string entId)
        {
            try
            {
                if (string.IsNullOrEmpty(entId))
                {
                    entId = BaseConfiguration.EntId;
                }

                List <Template> list = new List <Template>();
                Template        t    = new Template();
                ////获取页面配置信息
                TemplateDal dal_t = new TemplateDal();
                t.List_Sz = dal_t.GetSystemBase(entId);
                //获取药品分类
                ImgInfoDal dal_i = new ImgInfoDal();
                t.List_Fl = dal_i.GetCategory(entId, 7);
                //底部资讯
                ArticleDal dal_a = new ArticleDal();
                t.List_Zx = dal_a.GetArticle(entId, 11, "Mt");
                ///商品轮播图片
                t.List_Lb = dal_i.GetImgInfo(10, "LB", entId, "PC", "");
                list.Add(t);


                return(Json(new { success = true, list = list }));
            }
            catch (Exception ex)
            {
                LogQueue.Write(LogType.Error, "Template/HtmlTemplate", ex.Message.ToString());
                return(Json(new { success = false, message = "模板信息加载失败!" }));
            }
        }
Beispiel #3
0
        public static string TestDelete(string json)
        {
            var lb = TyConvert.JsonToObj <string[]>(json);
            var td = new TemplateDal();

            td.TestDelete(lb);
            return("true");
        }
Beispiel #4
0
        public static string TestUpdate(string json)
        {
            var lb = TyConvert.JsonToObj <List <BS_Template> >(json);
            var td = new TemplateDal();

            td.TestUpdate(lb);
            return("true");
        }
Beispiel #5
0
        public static string GetTemplateList(string json)
        {
            var objs           = TyConvert.JsonToObj <object[]>(json);
            var t              = TyConvert.JsonToObj <BS_Template>(objs[0].ToString());
            var td             = new TemplateDal();
            var bsTemplateList = td.GetList(t, (int)objs[1], (int)objs[2], out var rows);

            return(TyConvert.ObjToJson(new[] { rows.ToString(), TyConvert.ObjToJson(bsTemplateList) }));
        }
Beispiel #6
0
 /// <summary>
 /// 商城主题色
 /// </summary>
 /// <param name="entId">机构</param>
 /// <returns>成功返回true,color/失败返回false</returns>
 public ActionResult SubjectColor(string entId)
 {
     try
     {
         if (string.IsNullOrEmpty(entId))
         {
             entId = BaseConfiguration.EntId;
         }
         TemplateDal templateDal = new TemplateDal();
         string      color       = templateDal.SubjectColor(entId);
         return(Json(new { success = true, message = "商城主题加载成功", color = color }));
     }
     catch (Exception ex)
     {
         LogQueue.Write(LogType.Error, "Template/SubjectColor", ex.Message.ToString());
         return(Json(new { success = false, message = "商城主题加载失败" }));
     }
 }
        public DataStorage()
        {
            dbPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Mytheme");

            connectionString = $"Data Source={Path.Combine(dbPath, "mytheme.sqlite")}";

            Setting  = new SettingDal(connectionString);
            FileData = new FileDataDal(connectionString);

            TemplateCategory = new TemplateCategoryDal(connectionString);
            Template         = new TemplateDal(connectionString);
            TemplateField    = new TemplateFieldDal(connectionString);

            TableCategory = new TableCategoryDal(connectionString);
            RandomTable   = new RandomTableDal(connectionString);
            TableEntry    = new TableEntryDal(connectionString);

            Section   = new SectionDal(connectionString);
            Page      = new PageDal(connectionString);
            MapPage   = new MapPageDal(connectionString);
            MapMarker = new MapMarkerDal(connectionString);
        }