Ejemplo n.º 1
0
        private void RefreshMainGrid()
        {
            string str    = this.task_comboBox.Text;
            int    option = -1;

            if (str.Equals("Uncompleted", StringComparison.OrdinalIgnoreCase))
            {
                option = 0;
            }
            else if (str.Equals("Completed", StringComparison.OrdinalIgnoreCase))
            {
                option = 1;
            }

            SQL_condition formCond = this.GetForm_SQLcondition(), filterCond = this.formFilter.FilterCondition;
            SQL_condition cond = new SQL_condition(formCond, ConditionalOperator.And, filterCond);

            this.tsk_vc.Get_viewDT_async(option, cond);

            //Display setting in Grid
            this.SetGird_sortFilter(this.tsk_vc.ViewData_match_flag);
            UltraGrid_helper.AutoResize(this.main_ultraGrid);
            UltraGrid_helper.ClearCurrentFilters(this.main_ultraGrid);
            this.main_ultraGrid.ActiveRowScrollRegion.Scroll(RowScrollAction.Top);
        }
Ejemplo n.º 2
0
 private void main_ultraGrid_AfterRowRegionScroll(object sender, RowScrollRegionEventArgs e)
 {
     if (e.RowScrollRegion.ScrollPosition + e.RowScrollRegion.VisibleRows.Count > this.sf_master.sourceDT.Rows.Count - 1)
     {
         int rowsAdded = this.sf_master.Add_XBRLrows_to_DT();
         UltraGrid_helper.AutoResize(this.main_ultraGrid);
         if (rowsAdded == 0)
         {
             this.SetGird_sortFilter(this.sf_master.ViewData_match_flag);
         }
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Refresh data on Grid
        /// </summary>
        public void RefreshData(SQL_condition cond)
        {
            if (this.StopRefresh_flag)
            {
                return;
            }

            if ((DateTime.Now - this.lastRefreshAt).TotalSeconds < 5)
            {
                Console.WriteLine("---> XBRL_UserControl_func info 0: no refresh within 5 seconds, last at " + this.lastRefreshAt);
                return;
            }
            else
            {
                this.lastRefreshAt = DateTime.Now;
            }

            Console.WriteLine("---> XBRL_UserControl_func info 1: LastRefreshAt: " + this.lastRefreshAt);
            //get display data table
            this.sf_master.Get_viewDT_async(this.shown_processState, cond);

            //Get action textEditor
            UltraTextEditor curr_textEditor = null;

            if (this.approved_radioButton.Checked)
            {
                curr_textEditor = this.appr_textEditor;
            }
            else if (this.rejected_radioButton.Checked)
            {
                curr_textEditor = this.rej_textEditor;
            }
            else
            {
                curr_textEditor = this.pending_textEditor;
            }
            this.main_ultraGrid.DisplayLayout.Bands[0].Columns[UltraGrid_helper.ActionColumnName].EditorComponent = curr_textEditor;

            //Display setting in Grid
            this.SetGird_sortFilter(this.sf_master.ViewData_match_flag);
            UltraGrid_helper.AutoResize(this.main_ultraGrid);
            UltraGrid_helper.ClearCurrentFilters(this.main_ultraGrid);
            this.main_ultraGrid.ActiveRowScrollRegion.Scroll(RowScrollAction.Top);
        }
Ejemplo n.º 4
0
        public void RefreshData()
        {
            HssStatus status = HssStatus.None;

            if (this.appr_radioButton.Checked)
            {
                status = HssStatus.Approved;
            }
            else if (this.reject_radioButton.Checked)
            {
                status = HssStatus.Rejected;
            }
            else
            {
                status = HssStatus.Pending;
            }

            this.main_ultraGrid.DataSource = this.sf_control.Get_viewDT(status);

            UltraTextEditor curr_textEditor = null;

            if (this.appr_radioButton.Checked)
            {
                curr_textEditor = this.appr_textEditor;
            }
            else if (this.reject_radioButton.Checked)
            {
                curr_textEditor = this.rej_textEditor;
            }
            else
            {
                curr_textEditor = this.pending_textEditor;
            }

            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["Action"].EditorComponent    = curr_textEditor;
            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["Action"].ButtonDisplayStyle = ButtonDisplayStyle.Always;
            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["CreateTime"].Format         = UltraGrid_helper.DateTime_format_full;
            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["LastModifyAt"].Format       = UltraGrid_helper.DateTime_format_full;

            UltraGrid_helper.AutoResize(this.main_ultraGrid);
        }
Ejemplo n.º 5
0
        private void RefreshMainGrid()
        {
            List <Hss_DailyJobs> list = Hss_DailyJobs_master.GetAllJobs();

            this.sourceDT.Clear();
            foreach (Hss_DailyJobs hdj in list)
            {
                DataRow row = this.sourceDT.Rows.Add();
                row["ID"]         = hdj.ID;
                row["Job_Class"]  = hdj.Job_Class.Value;
                row["Job_ID"]     = hdj.Job_ID.Value;
                row["LastRunAt"]  = hdj.LastRunAt.GetValue_in_string(1);
                row["LastRunBy"]  = hdj.LastRunBy.Value;
                row["Locked"]     = hdj.Locked.Value;
                row["Notes"]      = hdj.Notes.Value;
                row["LastLockAt"] = hdj.LastLockAt.GetValue_in_string(1);
                row["LastLockBy"] = hdj.LastLockBy.Value;
            }

            UltraGrid_helper.AutoResize(this.main_ultraGrid);
        }
Ejemplo n.º 6
0
        public int Init_from_list(List <Dividend> dvdList)
        {
            this.sourctDT.Clear();
            if (dvdList == null)
            {
                return(-1);
            }

            foreach (Dividend dvd in dvdList)
            {
                DataRow row = this.sourctDT.Rows.Add();
                row["DividendIndex"] = dvd.DividendIndex;
                row["CUSIP"]         = dvd.CUSIP.Value;
                row["RecordDate"]    = dvd.RecordDate_ADR.Value;
                row["Depository"]    = dvd.Depositary.Value;
                row["Issue"]         = dvd.Issue.Value;
            }

            UltraGrid_helper.AutoResize(this.main_ultraGrid);
            this.ShowDialog();
            return(this.selected_dvdIndex);
        }
Ejemplo n.º 7
0
 private void SetGird_sortFilter(bool visible)
 {
     this.loadAll_button.Visible = !visible;
     UltraGrid_helper.Set_header_sortFilter(this.main_ultraGrid, visible);
     UltraGrid_helper.AutoResize(this.main_ultraGrid);
 }