Beispiel #1
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            BUS_HDDK         busdk  = new BUS_HDDK();
            DTO_HoaDonDangKy dto_dk = new DTO_HoaDonDangKy();

            dto_dk.Ma_kh      = txt_id.Text;
            dto_dk.Ngay       = DateTime.Today;
            dto_dk.Phihoamang = Int64.Parse(txt_phm.Text);
            busdk.Insert(dto_dk);
            load();
        }
Beispiel #2
0
        private void btn_them_Click(object sender, EventArgs e)
        {
            DTO_HoaDonDangKy dtohddk = new DTO_HoaDonDangKy();

            dtohddk.Ma_kh      = cb_sim.SelectedValue.ToString();
            dtohddk.Phihoamang = int.Parse(txtPhi.Text);
            dtohddk.Ngay       = DateTime.Now;
            if (bushddk.Insert(dtohddk))
            {
                MessageBox.Show("Thêm Thành Công");
            }
            else
            {
                MessageBox.Show("Thêm Thất Bại");
            }
            loaddata();
        }
Beispiel #3
0
 public bool Insert(DTO_HoaDonDangKy hd)
 {
     return(DalHDDK.insert(hd));
 }
Beispiel #4
0
        public bool insert(DTO_HoaDonDangKy hd)
        {
            string sql = "insert into " + table + " values('" + hd.Ma_kh + "','" + hd.Phihoamang + "','" + hd.Ngay + "')";

            return(Update(sql));
        }