Ejemplo n.º 1
0
        public static int SetTaskCompleteness(int taskID, string sourceID, string taskName, bool completed)
        {
            List <Task_Detail> list   = TaskDetailMaster.GetTaskDetail_list(taskID, sourceID, taskName);
            Bulk_DBcmd         bk_cmd = new Bulk_DBcmd();

            foreach (Task_Detail td in list)
            {
                td.Completed.Value = true;
                bk_cmd.Add_DBcmd(td.Get_DBupdate());
            }

            int count = bk_cmd.SaveToDB(Utility.Get_DRWIN_hDB());

            return(count);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Invoke by UserControl to retrieve data
        /// </summary>
        public void Get_viewDT_async(int completed_option, SQL_condition extraCond)
        {
            if (this.listThread != null)
            {
                this.threadStop_flag = true;
                this.listThread.Join();
            }

            this.sourceDT.Clear();//reset values
            this.taskDetail_list.Clear();
            this.currList_id              = 0;
            this.threadStop_flag          = false;
            this.dataFinishedLoading_flag = false;

            this.curr_reader = TaskDetailMaster.Get_DB_reader(completed_option, extraCond);//create reader for multi-threading
            this.listThread  = new Thread(this.Get_TDlist_threadRun);
            this.listThread.Start();

            int loopCount = 0;

            while (true)
            {
                ++loopCount;
                Thread.Sleep(1);
                if (this.dataFinishedLoading_flag)
                {
                    break;
                }
                if (this.taskDetail_list.Count > 50)
                {
                    break;
                }
            }

            if (Utility.Is_DWRIN_admin())
            {
                Console.WriteLine("---> TaskForm_viewControl info 0: loopCount = " + loopCount);
            }
            this.Add_TDrows_to_DT(UltraGrid_helper.RowsLoaded_per_scroll * 2);
        }
Ejemplo n.º 3
0
 public static int SetTaskCompleteness(int taskID, int sourceID, string taskName, bool completed)
 {
     return(TaskDetailMaster.SetTaskCompleteness(taskID, sourceID.ToString(), taskName, completed));
 }