Пример #1
0
        private bool BindingGridOffline(DataView dv)
        {
            try
            {
                //DataView dv = mbScheduleDetail.RetrievesAll(scheduleDetail).Tables[0].DefaultView;
                mdgrSchedule.AutoGenerateColumns = false;

                mdgrSchedule.DataSource = dv;
                SetButtonStatus();
                if (this.mdgrSchedule.RowCount <= 0)
                    return false;
                GenSTT();
                // Read workstation clip status
                mclipStatus = new WorkstationClipStatus(dv.Table.Rows,
                                                        "FILE_NAME",
                                                        "UPLOAD_DATE",
                                                        STR_COL_DOWNLOADED,
                                                        Properties.Settings.Default.ClipPath,
                                                        STR_COL_EXCEPTION_DOWNLOAD);
                mclipStatus.ReadWorkstationClipStatus(Properties.Settings.Default.ClipPath + "\\" + Properties.Settings.Default.CacheListName);
                if (mdteSearh.CompareTo(mdteNow) >= 0)
                    mbScheduleDetail.CheckDownloaded(dv.Table.Rows, Global.Workstation.WorkstationId, mdteSearh);
                return true;
            }
            catch (Exception)
            {
                // NOT NEED TODO
            }
            return false;
        }
Пример #2
0
 /// <summary>
 /// @author : KhoaHT
 /// @CreateDate:04/07/2008
 /// @Description: Binding grid with specific data view
 /// </summary>
 private bool BindingGrid(DataView dv)
 {
     try
     {
         //DataView dv = mbScheduleDetail.RetrievesAll(scheduleDetail).Tables[0].DefaultView;
         mdgrSchedule.AutoGenerateColumns = false;
         // Marked column used for random generating playlist
         dv.Table.Columns.Add(STR_COL_MARKED_USING, System.Type.GetType("System.Int32"));
         // download exception used for exception message when downloading
         dv.Table.Columns.Add(STR_COL_EXCEPTION_DOWNLOAD, System.Type.GetType("System.String"));
        // dv.Table.Columns.Add("##STT##", System.Type.GetType("System.Int32"));
         mdgrSchedule.DataSource = dv;
         SetButtonStatus();
         if (this.mdgrSchedule.RowCount <= 0)
             return false;
         GenSTT();
         // Read workstation clip status
         mclipStatus = new WorkstationClipStatus(dv.Table.Rows,
                                                 "FILE_NAME",
                                                 "UPLOAD_DATE",
                                                 STR_COL_DOWNLOADED,
                                                 Properties.Settings.Default.ClipPath,
                                                 STR_COL_EXCEPTION_DOWNLOAD);
         mclipStatus.ReadWorkstationClipStatus(Properties.Settings.Default.ClipPath + "\\" + Properties.Settings.Default.CacheListName);
         if (mdteSearh.CompareTo(mdteNow) >= 0)
             mbScheduleDetail.CheckDownloaded(dv.Table.Rows, Global.Workstation.WorkstationId, mdteSearh);
         return true;
     }
     catch (Exception)
     {
         //NOT NEED TODO
     }
     return false;
 }