Ejemplo n.º 1
0
        public PDFTask GetTask(string Id = "")
        {
            var sql = "";

            if (string.IsNullOrWhiteSpace(Id))
            {
                sql = @"select top 1 * from S_D_PDFTask Where Status = 'New' and StartTime is null";
            }
            else
            {
                sql = string.Format("select * from S_D_PDFTask where ID = '{0}'", Id);
            }

            PDFTask task   = null;
            var     db     = SqlHelper.Create("FileStore");
            var     reader = db.ExecuteReader(sql);

            if (reader.Read())
            {
                task              = new PDFTask();
                task.ID           = reader.Get("ID", "");
                task.EndTime      = reader.Get <DateTime>("EndTime");
                task.FileID       = reader.Get("FileID", "");
                task.FileType     = reader.Get("FileType", "");
                task.IsSplit      = reader.Get("IsSplit", false);
                task.PDFFileID    = reader.Get("PDFFileIDID", "");
                task.PDFPageCount = reader.Get("PDFPageCount", 0);
                task.SnapFileID   = reader.Get("SnapFileID", "");
                task.StartTime    = reader.Get <DateTime>("StartTime");
                task.Status       = reader.Get("Status", "");
                task.SWFFileID    = reader.Get("SWFFileID", "");
            }
            reader.Close();
            return(task);
        }
Ejemplo n.º 2
0
        private PDFTask Row2PDFTask(DataRow dr)
        {
            var task = new PDFTask();

            task.ID = dr["ID"].ToString();
            task.ID = dr["ID"].ToString();

            return(task);
        }
Ejemplo n.º 3
0
        public void AddTask(PDFTask task)
        {
            var strTask = JsonConvert.SerializeObject(task);
            var dic     = new Dictionary <string, object>();

            dic.Add("task", strTask);

            var taskId = Get <string>("AddTask", dic);
        }
Ejemplo n.º 4
0
 public void AddTask(PDFTask task)
 {
     throw new NotImplementedException();
 }