Esempio n. 1
0
 public void SaveDataBaseTempData(object obj)
 {
     SqlHelper.ExcuteSql(DllTask.SystemRuntimeInfo.TaskConnectString, (c) =>
     {
         Dal.tb_tempdata_dal taskdal = new Dal.tb_tempdata_dal();
         taskdal.SaveTempData(c, DllTask.SystemRuntimeInfo.TaskModel.id, new JsonProvider().Serializer(obj));
     });
 }
Esempio n. 2
0
        public T GetDataBaseTempData <T>() where T : class
        {
            string json = null;

            SqlHelper.ExcuteSql(DllTask.SystemRuntimeInfo.TaskConnectString, (c) =>
            {
                Dal.tb_tempdata_dal taskdal = new Dal.tb_tempdata_dal();
                json = taskdal.GetTempData(c, DllTask.SystemRuntimeInfo.TaskModel.id);
            });
            if (string.IsNullOrEmpty(json))
            {
                return(null);
            }
            var obj = new JsonProvider().Deserialize <T>(json);

            return(obj);
        }