private void BtnSum_Click(object sender, EventArgs e) { List <전표리스트> list = new List <전표리스트>(); bool isChecked; for (int i = 0; i < dgv전표리스트.RowCount; i++) { isChecked = Convert.ToBoolean(dgv전표리스트.Rows[i].Cells[0].Value); if (isChecked == true) { // list.Add((전표리스트)dgv전표리스트.Rows[i].DataBoundItem); list.Add(전표리스트s[i]); } } if (전표리스트s == null) { return; } if (list.Count == 0) { list = 전표리스트s; } 계정합계Control = new 계정합계Control(); 계정합계Control.SendList(list); 계정합계Control.Recieve전표출력(this); CodeHelperForm form = new CodeHelperForm(계정합계Control); form.ShowDialog(); }
public CodeHelperForm(계정합계Control 계정합계Control) { InitializeComponent(); this.계정합계Control = 계정합계Control; this.panel.Controls.Add(계정합계Control); 계정합계Control.Dock = DockStyle.Fill; this.Text = "계정별합계"; this.Size = new Size(630, 440); this.Resizable = false; 계정합계Control.RecieveMenuForm(this); ActiveControl = 계정합계Control.dgv전표리스트; this.SetFormLocation(); }
public void Recieve계정합계Control(계정합계Control 계정합계Control) { this.계정합계Control = 계정합계Control; }