public Info.PhieuThu SetInfoPHIEUXUAT_Khac()
 {
     Info.PhieuThu info = new Info.PhieuThu();
     info.MaKH     = 0;
     info.NgayThu  = dtpNgayThu.Value;
     info.TongTien = float.Parse(txtTongTien.Text);
     info.LyDo     = txtLyDo.Text;
     info.KemTheo  = txtKeoTheo.Text;
     info.No       = txtNo.Text;
     info.Co       = txtCo.Text;
     info.GhiChu   = cmbKH.Text.ToString() + "_" + txtDiaChi.Text;
     return(info);
 }
 private void InsertPhieuThu()
 {
     if (rdKH.Checked == true)
     {
         infoPhieuThu = SetInfoPHIEUXUAT();
     }
     else
     {
         infoPhieuThu = SetInfoPHIEUXUAT_Khac();
     }
     BLL.TPhieuThu tPhieuThu = new BLL.TPhieuThu();
     infoPhieuThu.Ma = tPhieuThu.InsertPHIEUTHU(infoPhieuThu);
 }
 public Info.PhieuThu SetInfoPHIEUXUAT()
 {
     Info.PhieuThu info = new Info.PhieuThu();
     info.MaKH     = int.Parse(cmbKH.SelectedValue.ToString());
     info.NgayThu  = dtpNgayThu.Value;
     info.TongTien = float.Parse(txtTongTien.Text);
     info.LyDo     = txtLyDo.Text;
     info.KemTheo  = txtKeoTheo.Text;
     info.No       = txtNo.Text;
     info.Co       = txtCo.Text;
     info.GhiChu   = DBNull.Value.ToString();
     return(info);
 }
 private void InsertPhieuThu()
 {
     if (rdKH.Checked == true)
         infoPhieuThu = SetInfoPHIEUXUAT();
     else
         infoPhieuThu = SetInfoPHIEUXUAT_Khac();
     BLL.TPhieuThu tPhieuThu = new BLL.TPhieuThu();
     infoPhieuThu.Ma = tPhieuThu.InsertPHIEUTHU(infoPhieuThu);
 }
 public Info.PhieuThu SetInfoPHIEUXUAT_Khac()
 {
     Info.PhieuThu info = new Info.PhieuThu();
        info.MaKH = 0;
        info.NgayThu = dtpNgayThu.Value;
        info.TongTien = float.Parse(txtTongTien.Text);
        info.LyDo = txtLyDo.Text;
        info.KemTheo = txtKeoTheo.Text;
        info.No = txtNo.Text;
        info.Co = txtCo.Text;
        info.GhiChu = cmbKH.Text.ToString()+"_" +txtDiaChi.Text;
        return info;
 }
 public Info.PhieuThu SetInfoPHIEUXUAT()
 {
     Info.PhieuThu info = new Info.PhieuThu();
     info.MaKH = int.Parse(cmbKH.SelectedValue.ToString());
     info.NgayThu = dtpNgayThu.Value;
     info.TongTien = float.Parse( txtTongTien.Text);
     info.LyDo = txtLyDo.Text;
     info.KemTheo = txtKeoTheo.Text;
     info.No= txtNo.Text;
     info.Co = txtCo.Text;
     info.GhiChu = DBNull.Value.ToString();
     return info;
 }