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()); op_us_gd_thanh_toan.strREFERENCE_CODE = m_txt_ma_lop_mon.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); op_us_gd_thanh_toan.SetGIA_TRI_NGHIEM_THU_THUC_TENull(); op_us_gd_thanh_toan.dcTONG_TIEN_THUC_NHAN = CIPConvert.ToDecimal(m_txt_so_tien_thuc_nhan.Text); 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"]); } op_us_gd_thanh_toan.strGHI_CHU_CAC_MON_PHU_TRACH = m_txt_ten_cac_mon_phu_trach.Text.Trim(); op_us_gd_thanh_toan.strGHI_CHU_THOI_GIAN_LOP_MON = m_txt_thoi_gian_lop_mon.Text.Trim(); op_us_gd_thanh_toan.strGHI_CHU_HE_SO_DON_GIA = m_txt_he_so_quy_mo.Text; op_us_gd_thanh_toan.strGHI_CHU_4 = m_txt_ghi_chu_4.Text; op_us_gd_thanh_toan.strGHI_CHU_5 = m_txt_ghi_chu_5.Text; }
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(); } }