BKI_DichVuMatDat.US.US_GD_HOP_DONG.KiemTraThoiGianHopDongHopLeForInsert C# (CSharp) Method

KiemTraThoiGianHopDongHopLeForInsert() public method

public KiemTraThoiGianHopDongHopLeForInsert ( decimal ip_dc_id_nhan_vien, System.DateTime ip_dat_tu_ngay, System.DateTime ip_dat_den_ngay ) : bool
ip_dc_id_nhan_vien decimal
ip_dat_tu_ngay System.DateTime
ip_dat_den_ngay System.DateTime
return bool
        public bool KiemTraThoiGianHopDongHopLeForInsert(decimal ip_dc_id_nhan_vien, DateTime ip_dat_tu_ngay, DateTime ip_dat_den_ngay)
        {
            CStoredProc v_cstore = new CStoredProc("pr_HD_du_lieu_hop_dong_hop_le_CheckInsert");
            v_cstore.addDecimalInputParam("@ip_dc_id_nhan_vien", ip_dc_id_nhan_vien);
            v_cstore.addDatetimeInputParam("@ip_dat_tu_ngay", ip_dat_tu_ngay);
            v_cstore.addDatetimeInputParam("@ip_dat_den_ngay", ip_dat_den_ngay);

            SqlParameter v_yn = v_cstore.addNVarcharOutputParam("@op_str_hop_le_yn", "");
            v_cstore.ExecuteCommand(this);

            return v_yn.Value.ToString() == "Y" ? true : false;
        }

Usage Example

 private bool check_thoi_gian_hop_dong_Insert()
 {
     //Hợp đồng hợp lệ khi trong một khoảng thời gian chỉ có một hợp đồng
     US_GD_HOP_DONG v_us = new US_GD_HOP_DONG();
     DateTime v_dat_den_ngay = m_dat_ngay_ket_thuc.EditValue == null ? new DateTime(2100, 01, 01).Date : m_dat_ngay_ket_thuc.DateTime.Date;
     return v_us.KiemTraThoiGianHopDongHopLeForInsert(Convert.ToDecimal(m_sle_chon_nhan_vien.EditValue), m_dat_ngay_bat_dau.DateTime.Date, v_dat_den_ngay);
 }
All Usage Examples Of BKI_DichVuMatDat.US.US_GD_HOP_DONG::KiemTraThoiGianHopDongHopLeForInsert