예제 #1
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            var ids = new List <long>();

            for (int i = 0; i < myGridViewBinding1.View.RowCount; ++i)
            {
                if (Convert.ToInt32(STATUS.FindByText(Convert.ToString(myGridViewBinding1.GetCellValue(i, "done")))) != -1)
                {
                    continue;
                }
                ids.Add(Convert.ToInt64(myGridViewBinding1.GetCellValue(i, "jvpId")));
            }

            if (ids.Count == 0)
            {
                Commons.ShowInfoBox(this, "无可操作记录");
                return;
            }

            var dlg = new BatchProcessDlg(ids);

            dlg.StartPosition = FormStartPosition.CenterParent;
            dlg.RunSingle    += (id) => {
                var p = BusinessTransfers.ExecuteInvestBonus(m_tbdId, id).Result;
                myGridViewBinding1.BindTo(p, Commons.BindFlag.Update, "jvpId");
                return(p);
            };
            dlg.ShowDialog();
            //UpdateTable1();
        }
예제 #2
0
 private void SetGridView1RowColor()
 {
     for (int i = 0; i < myGridViewBinding1.View.RowCount; ++i)
     {
         var status = VIEW1STATUS.FindByText(Convert.ToString(myGridViewBinding1.GetCellValue(i, "status")));
         myGridViewBinding1.View.Rows[i].Tag = status == "1" ? true : false;
     }
 }
예제 #3
0
 private void SetGridView2RowColor() {
     for (int i = 0; i < myGridViewBinding2.View.Rows.Count; ++i) {
         var done = VIEW2STATUS.FindByText(Convert.ToString(myGridViewBinding2.GetCellValue(i, "done")));
         if (done == "2") {
             myGridViewBinding2.View.Rows[i].DefaultCellStyle.BackColor = Color.LightGreen;
         } else if (done == "1") {
             myGridViewBinding2.View.Rows[i].DefaultCellStyle.BackColor = Color.Red;
         } else {
             myGridViewBinding2.View.Rows[i].DefaultCellStyle.BackColor = Color.White;
         }
     }
 }
예제 #4
0
        private async void Del(IList <Tuple <string, string> > delInfo)
        {
            toolStrip1.Enabled = false;
            var ss = delInfo.JoinSome();

            if (Commons.ShowConfirmBox(this, "确定清空协议嘛?", "清空"))
            {
                foreach (var single in delInfo)
                {
                    var d = new Dictionary <string, object>();
                    d["p-id"]      = m_pId;
                    d["file-name"] = single.Item1;
                    d["file-type"] = ALL_AGREEMENTS.FindByText(single.Item2);
                    await PrjSignAgreements.deleteAgreements(d);
                }
                UpdateTable();
            }

            toolStrip1.Enabled = true;
        }
예제 #5
0
        private async void ChangeLevel()
        {
            var level = Commons.ShowComboboxInputDialog(this, INVESTOR_LEVEL, "请选择账户级别:",
                                                        string.Format("修改级别-{0}", m_auId), INVESTOR_LEVEL.FindByText(tbInvestorLevel.Text), 300);

            if (level == "-1")
            {
                return;
            }

            var d = new Dictionary <string, object>();

            d["au-id"] = m_auId;
            d["lev"]   = level;

            var p = await InvestPersons.UpdateLevel(d);

            if (p.IsOk)
            {
                UpdateTable();
                Commons.ShowInfoBox(this, "修改成功");
            }
            else
            {
                Commons.ShowResultErrorBox(this, p);
            }
        }