Beispiel #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);
        }
        public SPR_report_UserControl()
        {
            this.InitializeComponent();
            if (Utility.Is_DWRIN_admin())
            {
                this.upload_button.Visible = true;
            }

            UltraGrid_helper.InitGrid(this.main_ultraGrid);

            UltraTextEditor_setting setting_pending = new UltraTextEditor_setting();

            setting_pending.AddButton("Approve", "OK");
            setting_pending.AddButton("Reject", "Cancel");
            setting_pending.AddButton("ViewData");
            this.pending_textEditor = UltraTextEditor_helper.CreateTextEditorButtons(setting_pending);
            this.pending_textEditor.EditorButtonClick += this.ActionButtonEvent_textEditor;

            UltraTextEditor_setting setting_appr = new UltraTextEditor_setting();

            setting_appr.AddButton("Restore", "Restore");
            setting_appr.AddButton("ViewData");
            this.appr_textEditor = UltraTextEditor_helper.CreateTextEditorButtons(setting_appr);
            this.appr_textEditor.EditorButtonClick += this.ActionButtonEvent_textEditor;

            UltraTextEditor_setting setting_reject = new UltraTextEditor_setting();

            setting_reject.AddButton("Restore", "Restore");
            setting_reject.AddButton("ViewData");
            this.rej_textEditor = UltraTextEditor_helper.CreateTextEditorButtons(setting_reject);
            this.rej_textEditor.EditorButtonClick += this.ActionButtonEvent_textEditor;
        }
Beispiel #3
0
        private void XBRL_UserControl_Load(object sender, EventArgs e)
        {
            UltraGrid_helper.SetDataSource(this.main_ultraGrid, this.sf_master.sourceDT);
            this.formFilter = new FilterForm(this.sf_master.sourceDT);
            this.RefreshData(null);

            this.main_ultraGrid.DisplayLayout.Bands[0].Columns[UltraGrid_helper.ActionColumnName].ButtonDisplayStyle =
                Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
            UltraGrid_helper.SetMaxWidth(this.main_ultraGrid, 220);
        }
Beispiel #4
0
        public DailyJobs_form()
        {
            this.InitializeComponent();

            this.sourceDT = this.Get_dailyJobs_dt();
            UltraGrid_helper.SetDataSource(this.main_ultraGrid, this.sourceDT);
            UltraGrid_helper.InitGrid(this.main_ultraGrid);

            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["ID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button;
            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["ID"].ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
        }
Beispiel #5
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);
         }
     }
 }
Beispiel #6
0
        public MainForm()
        {
            this.InitializeComponent();

            UltraGrid_helper.SetDataSource(this.main_ultraGrid, this.tsk_vc.sourceDT);
            UltraGrid_helper.InitGrid(this.main_ultraGrid, false, false);
            UltraGrid_helper.Set_readOnly_columns(this.main_ultraGrid, false, 0);
            UltraGrid_helper.SetMaxWidth(this.main_ultraGrid, 250);

            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["TaskDetailID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button;
            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["TaskDetailID"].ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
            this.main_ultraGrid.DisplayLayout.Bands[0].SortedColumns.Add("TaskDetailID", false);
        }
Beispiel #7
0
        public Form_DividendSelector()
        {
            this.InitializeComponent();

            this.sourctDT.Columns.Add("DividendIndex", typeof(int));
            this.sourctDT.Columns.Add("CUSIP");
            this.sourctDT.Columns.Add("RecordDate", typeof(DateTime));
            this.sourctDT.Columns.Add("Depository");
            this.sourctDT.Columns.Add("Issue");

            this.main_ultraGrid.DataSource = this.sourctDT;

            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["DividendIndex"].ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["DividendIndex"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button;

            UltraGrid_helper.InitGrid(this.main_ultraGrid);
        }
Beispiel #8
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);
        }
        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);
        }
Beispiel #10
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);
        }
Beispiel #11
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);
        }
Beispiel #12
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);
 }
Beispiel #13
0
 private void ColHeader_unhideAll_rightMouseClick(object sender, EventArgs e)
 {
     UltraGrid_helper.UnhideAllColumns(this.main_ultraGrid);
 }
Beispiel #14
0
 private void ColHeader_hide_rightMouseClick(object sender, EventArgs e)
 {
     UltraGrid_helper.HideColumn_byHeader(this.main_ultraGrid, this.currColName_toHide);
 }
Beispiel #15
0
 public XBRL_UserControl()
 {
     this.InitializeComponent();
     UltraGrid_helper.InitGrid(this.main_ultraGrid, true, true);
     this.Prepare_actionColumn();
 }