private void form_2_us_obj(US_V_GD_THANH_TOAN op_us_gd_thanh_toan)
    {
        op_us_gd_thanh_toan.dcID_HOP_DONG_KHUNG = get_id_hd_khung_by_so_hd(m_txt_so_hop_dong.Text.Trim());
        if (m_txt_tham_so.Text.Contains("Tạm ứng"))
        {
            op_us_gd_thanh_toan.strREFERENCE_CODE = cut_string_tam_ung(m_txt_tham_so.Text.Trim());
        }
        else if (m_lbl_tham_so.Text.Contains("Mã lớp"))
        {
            op_us_gd_thanh_toan.strREFERENCE_CODE = m_txt_tham_so.Text;
        }
        else
        {
            op_us_gd_thanh_toan.SetREFERENCE_CODENull();
        }
        op_us_gd_thanh_toan.dcID_TRANG_THAI_THANH_TOAN = CIPConvert.ToDecimal(m_cbo_trang_thai_thanh_toan.SelectedValue);
        // Đây chỉ là chỉnh sửa mô tả thôi, ko liên quan đến chỉnh sửa trạng thái thanh toán
        string v_str_ma_dot_tt = get_ma_dot_tt_by_id_dot(CIPConvert.ToDecimal(m_cbo_dot_thanh_toan.SelectedValue));

        if (op_us_gd_thanh_toan.dcID_TRANG_THAI_THANH_TOAN.ToString().Equals(lblUser.ToolTip))
        {
            op_us_gd_thanh_toan.strSO_PHIEU_THANH_TOAN = v_str_ma_dot_tt;
            op_us_gd_thanh_toan.strDESCRIPTION         = m_txt_mo_ta.Text.Trim();
        }
        else
        {
            op_us_gd_thanh_toan.strSO_PHIEU_THANH_TOAN = "KHO";
            op_us_gd_thanh_toan.strDESCRIPTION         = m_txt_mo_ta.Text.Trim() + " " + v_str_ma_dot_tt;
        }
    }
 private void form_2_us_obj(US_V_GD_THANH_TOAN op_us_gd_thanh_toan)
 {
     op_us_gd_thanh_toan.strSO_PHIEU_THANH_TOAN = get_ma_dot_tt_by_id_dot(CIPConvert.ToDecimal(m_cbo_dot_thanh_toan.SelectedValue));
     op_us_gd_thanh_toan.dcID_HOP_DONG_KHUNG    = get_id_hd_khung_by_so_hd(m_txt_so_hop_dong.Text.Trim());
     if (m_dat_ngay_thanh_toan.SelectedDate == CIPConvert.ToDatetime("01/01/0001", "dd/MM/yyyy"))
     {
         string sScript;
         sScript = "<script language='javascript'>alert('Bạn phải nhập ngày thanh toán');</script>";
         Page.ClientScript.RegisterStartupScript(this.GetType(), "onload", sScript);
         m_dat_ngay_thanh_toan.Focus();
         return;
     }
     else
     {
         op_us_gd_thanh_toan.datNGAY_THANH_TOAN = m_dat_ngay_thanh_toan.SelectedDate;
     }
     op_us_gd_thanh_toan.dcTONG_TIEN_THANH_TOAN = CIPConvert.ToDecimal(m_txt_so_tien_thanh_toan.Text);
     if (m_txt_so_tien_thuc_nhan.Text == "")
     {
         op_us_gd_thanh_toan.dcTONG_TIEN_THUC_NHAN = 0;
     }
     else
     {
         op_us_gd_thanh_toan.dcTONG_TIEN_THUC_NHAN = CIPConvert.ToDecimal(m_txt_so_tien_thuc_nhan.Text);
     }
     if (m_txt_so_tien_thue1.Text == "")
     {
         op_us_gd_thanh_toan.dcSO_TIEN_THUE = 0;
     }
     else
     {
         op_us_gd_thanh_toan.dcSO_TIEN_THUE = CIPConvert.ToDecimal(m_txt_so_tien_thue1.Text);
     }
     op_us_gd_thanh_toan.dcID_TRANG_THAI_THANH_TOAN = CIPConvert.ToDecimal(m_cbo_trang_thai_thanh_toan.SelectedValue);
     op_us_gd_thanh_toan.strDESCRIPTION             = m_txt_mo_ta.Text.Trim();
     if (Session["UserName"].GetType() != typeof(DBNull))
     {
         op_us_gd_thanh_toan.strPO_LAP_THANH_TOAN = CIPConvert.ToStr(Session["UserName"]);
     }
     if (rdl_noi_dung_list.Items[1].Selected == true)
     {
         op_us_gd_thanh_toan.SetGIA_TRI_NGHIEM_THU_THUC_TENull();
     }
     else
     {
         op_us_gd_thanh_toan.dcGIA_TRI_NGHIEM_THU_THUC_TE = CIPConvert.ToDecimal(m_txt_gia_tri_nghiem_thu_thuc_te.Text.Trim());
     }
     if (rdl_noi_dung_list.Items[1].Selected)
     {
         op_us_gd_thanh_toan.strREFERENCE_CODE = "đợt " + m_cbo_lan_so.SelectedValue;
     }
     else
     {
         op_us_gd_thanh_toan.SetREFERENCE_CODENull();
     }
 }
 private void form_2_us_obj(US_V_GD_THANH_TOAN op_us_gd_thanh_toan)
 {
     op_us_gd_thanh_toan.strSO_PHIEU_THANH_TOAN = get_ma_dot_tt_by_id_dot(CIPConvert.ToDecimal(m_cbo_dot_thanh_toan.SelectedValue));
     op_us_gd_thanh_toan.dcID_HOP_DONG_KHUNG    = get_id_hd_khung_by_so_hd(m_txt_so_hop_dong.Text.Trim());
     if (m_txt_tham_so.Text.Contains("Tạm ứng"))
     {
         op_us_gd_thanh_toan.strREFERENCE_CODE = cut_string_tam_ung(m_txt_tham_so.Text.Trim());
     }
     else if (m_lbl_tham_so.Text.Contains("Mã lớp"))
     {
         op_us_gd_thanh_toan.strREFERENCE_CODE = m_txt_tham_so.Text;
     }
     else
     {
         op_us_gd_thanh_toan.SetREFERENCE_CODENull();
     }
     op_us_gd_thanh_toan.dcID_TRANG_THAI_THANH_TOAN = CIPConvert.ToDecimal(m_cbo_trang_thai_thanh_toan.SelectedValue);
 }
    private void form_2_us_obj(US_V_GD_THANH_TOAN op_us_gd_thanh_toan)
    {
        // Lấy số phiếu thanh toán cũ cho vào so_phieu_thanh_toan
        op_us_gd_thanh_toan.strSO_PHIEU_THANH_TOAN = hdf_ma_dot_thanh_toan_cu.Value;

        op_us_gd_thanh_toan.dcID_HOP_DONG_KHUNG = get_id_hd_khung_by_so_hd(m_txt_so_hop_dong.Text.Trim());
        if (m_txt_tham_so.Text.Contains("Tạm ứng"))
        {
            op_us_gd_thanh_toan.strREFERENCE_CODE = cut_string_tam_ung(m_txt_tham_so.Text.Trim());
        }
        else if (m_lbl_tham_so.Text.Contains("Mã lớp"))
        {
            op_us_gd_thanh_toan.strREFERENCE_CODE = m_txt_tham_so.Text;
        }
        else
        {
            op_us_gd_thanh_toan.SetREFERENCE_CODENull();
        }
        // Update: Trạng thái thanh toán, mô tả
        op_us_gd_thanh_toan.dcID_TRANG_THAI_THANH_TOAN = CIPConvert.ToDecimal(m_cbo_trang_thai_thanh_toan.SelectedValue);
        op_us_gd_thanh_toan.strDESCRIPTION             = m_txt_mo_ta.Text;
    }