x86.frmMain.submitSubFun C# (CSharp) Method

submitSubFun() private method

private submitSubFun ( object o ) : void
o object
return void
        private void submitSubFun(object o)
        {
            Hashtable hs = (Hashtable)o;
            DataGridView dg1 = (DataGridView)hs["grid"];
            int sumCount=0;
            for (int i = 0; i < dg1.Rows.Count; i++)
            {
                if (dg1.Rows[i].Cells[4].EditedFormattedValue.ToString() == "True")
                {
                    sumCount++;
                }

 
            }
            int count = 0;
            string g_payway = (string)hs["g_payway"];
            string g_textPayaccount = (string)hs["g_textPayaccount"];
            string g_realName = (string)hs["g_realName"];
            delegateSetProgressMaxValue = SetProgressMaxValue;
            this.Invoke(delegateSetProgressMaxValue,progressBar1, sumCount);
            for (int i = 0; i < dg1.Rows.Count; i++)
            {
                if (dg1.Rows[i].Cells[4].EditedFormattedValue.ToString() == "True")
                {

                    string g_userName = dg1.Rows[i].Cells[1].EditedFormattedValue.ToString();

                    Hashtable ht = new Hashtable();
                

                    ht.Add("g_userName", g_userName);
                    ht.Add("g_payway", g_payway);
                    ht.Add("g_textPayaccount", g_textPayaccount);
                    ht.Add("g_realName", g_realName);
                    
                 
                    if (isAdded(g_userName))
                    {
                        continue;
                    }
                    threadbackMoney = new Thread(new ParameterizedThreadStart(updatebackMoney));
                    threadbackMoney.Start(ht);
                   this.Invoke(delegateProgress,progressBar1, count++,1);
                }
             
            }
           this.Invoke(delegateProgress, progressBar1, 0,0);
        }
        public delegate void  DelegateSetProgressMaxValue(ProgressBar p,int max);
frmMain