private void createListCTNHAP(ref List <ctphieunhap> list) { ctphieunhap ct = new ctphieunhap(); ct.maphienhap = _maphieunhap; ct.soluong = int.Parse(this.edt_soluong.Text.ToString()); ct.manguyenlieu = int.Parse(this.cmb_nguyenlieu.SelectedValue.ToString()); ct.thanhtien = float.Parse(this.edt_soluong.Text.ToString()) * float.Parse(this.edt_thanhtien.Text.ToString()); ct.mactphieunhap = -1; //auto list.Add(ct); }
private void btn_save_Click(object sender, EventArgs e) { List <ctphieunhap> list = new List <ctphieunhap>(); createListCTNHAP(ref list); phieunhap pn = new phieunhap(); getInfoPN(ref pn); pn.ThemPhieuNhap(); ctphieunhap ctpn = new ctphieunhap(); ctpn.ThemCTPhieuNhap(list); }
private void getInfo(ref ctphieunhap pn) { }