private void simpleButton3_Click(object sender, EventArgs e) { FormTZGSXX tzxx = new FormTZGSXX(); tzxx.pid = TZGSID; tzxx.type = "line"; tzxx.devicenum = Convert.ToInt32(txtts.Text); tzxx.buildyear = StartYear; tzxx.buildend = FinishYear; if (comboBoxEdit5.Text != null) { tzxx.volt = Convert.ToDouble(comboBoxEdit5.Text); } tzxx.ShowDialog(); if (tzxx.DialogResult == DialogResult.OK) { txtts.Text = tzxx.ObjectList.Count.ToString(); // double rl = 0.0; int tash = 0; //foreach (Ps_Table_TZMX pt in tzxx.ObjectList) //{ // r1 += pt.Vol; // tash += pt.Num; //} //spinEdit2.Value = (decimal)r1; //txtzb.Text = tash.ToString(); } }
private void simpleButton4_Click(object sender, EventArgs e) { FormTZGSXX tzxx = new FormTZGSXX(); tzxx.pid = TZGSID; tzxx.type = "sub"; tzxx.devicenum =Convert.ToInt32(txtzs.Text) ; tzxx.buildyear = StartYear; tzxx.buildend = FinishYear; if (comboBoxEdit6.Text!=null) { tzxx.volt = Convert.ToDouble(comboBoxEdit6.Text); } tzxx.ShowDialog(); if (tzxx.DialogResult==DialogResult.OK) { txtzs.Text = tzxx.ObjectList.Count.ToString(); double rl = 0.0; int tash = 0; foreach (Ps_Table_TZMX pt in tzxx.ObjectList) { rl+=pt.Vol; tash += pt.Num; } spinEdit2.Value = (decimal)rl; txtzb.Text = tash.ToString(); } }