Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
 private void getInfo(ref ctphieunhap pn)
 {
 }