Inheritance: IP.Core.IPUserService.US_Object
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     try
     {
         if(m_sle_quy_tien_thuong.EditValue == null)
         {
             return;
         }
         var dlg = XtraMessageBox.Show("Bạn có chắc chắn muốn xóa xử liệu quỹ thưởng này. Việc xóa sẽ xóa hết dữ liệu thu nhập khác từ nhân viên. Ấn Yes để XÓA!", "XÁC NHẬN", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
         if(dlg == System.Windows.Forms.DialogResult.Yes)
         {
             US_GD_QUY_TIEN_THUONG v_us_quy = new US_GD_QUY_TIEN_THUONG();
             v_us_quy.xoa_quy_tien_thuong(Convert.ToDecimal(m_sle_quy_tien_thuong.EditValue));
             XtraMessageBox.Show("Xóa dữ liệu quỹ thưởng thành công", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Information);
             fill_data_quy_tien_thuong();
         }
     }
     catch(Exception v_e)
     {
         CSystemLog_301.ExceptionHandle(v_e);
     }
 }
 private void mark_complete_tinh_thuong()
 {
     try
     {
         US_GD_QUY_TIEN_THUONG v_us_quy = new US_GD_QUY_TIEN_THUONG(m_us_v_gd_quy_tien_thuong.dcID);
         v_us_quy.strTINH_XONG_YN = "Y";
         v_us_quy.Update();
     }
     catch(Exception)
     {
         XtraMessageBox.Show("Có lỗi xảy ra!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         throw;
     }
 }
        private decimal find_id_gd_quy_tien_thuong(decimal ip_dc_nam, decimal ip_dc_loai_quy_tien)
        {
            try
            {
                US_GD_QUY_TIEN_THUONG v_us = new US_GD_QUY_TIEN_THUONG();
                DS_GD_QUY_TIEN_THUONG v_ds = new DS_GD_QUY_TIEN_THUONG();

                v_us.FillDataset(v_ds);

                string v_str_filter = "NAM = " + ip_dc_nam + " AND ID_MUC_LNS = " + ip_dc_loai_quy_tien;
                DataRow[] v_dr = v_ds.GD_QUY_TIEN_THUONG.Select(v_str_filter);

                if (v_dr.Count() == 0)
                {
                    return 0;
                }
                else
                {
                    return CIPConvert.ToDecimal(v_dr.First()["ID"].ToString());
                }
            }
            catch (Exception v_e)
            {
                throw v_e;
            }
        }
        //GD_QUY_TIEN_THUONG
        private void xoa_quy_tien_hs_bs_trong_nam()
        {
            decimal v_is_gd_quy_tien_thuong = 0;
            v_is_gd_quy_tien_thuong = find_id_gd_quy_tien_thuong(CIPConvert.ToDecimal(m_txt_chon_nam.Text.Trim()), CONST_ID_TIEN_THUONG.THUONG_HS_BS);
            US_GD_QUY_TIEN_THUONG v_us = new US_GD_QUY_TIEN_THUONG(v_is_gd_quy_tien_thuong);

            try
            {
                v_us.strDA_XOA = "Y";
                v_us.Update();
            }
            catch (Exception v_e)
            {
                throw v_e;
            }
        }
 private void luu_so_tien_vao_quy_tien()
 {
     US_GD_QUY_TIEN_THUONG v_us_quy_tien_thuong = new US_GD_QUY_TIEN_THUONG();
     //xoa_quy_tien_hs_bs_trong_nam();
     try
     {
         v_us_quy_tien_thuong.dcSO_TIEN = CIPConvert.ToDecimal(m_txt_so_tien.EditValue);
         v_us_quy_tien_thuong.strTEN_QUY = "Bổ sung lương";
         v_us_quy_tien_thuong.strNAM = m_txt_chon_nam.Text;
         v_us_quy_tien_thuong.strTHANG = m_txt_chon_thang.Text;
         v_us_quy_tien_thuong.strTINH_XONG_YN = "Y";
         v_us_quy_tien_thuong.dcID_LOAI_QUY_TIEN = CONST_ID_TIEN_THUONG.THUONG_HS_BS;
         v_us_quy_tien_thuong.strDA_XOA = "N";
         v_us_quy_tien_thuong.strLY_DO_THUONG = m_txt_ly_do_thuong.Text;
         v_us_quy_tien_thuong.strNGUOI_LAP =  CAppContext_201.getCurrentUserName();
         v_us_quy_tien_thuong.Insert();
     }
     catch (Exception v_e)
     {
         throw v_e;
     }
 }
        private bool kiem_tra_nam_da_thuong_hs_bo_sung(decimal ip_dc_nam)
        {
            DS_GD_QUY_TIEN_THUONG v_ds = new DS_GD_QUY_TIEN_THUONG();
            US_GD_QUY_TIEN_THUONG v_us = new US_GD_QUY_TIEN_THUONG();

            string op_str_nam_da_thuong_hs_bo_sung = "N"; //Y: da thuong va N: chua thuong
            v_us.kiem_tra_nam_das_thuong_hs_bo_sung(ip_dc_nam, ref op_str_nam_da_thuong_hs_bo_sung);

            if (op_str_nam_da_thuong_hs_bo_sung == "Y")
            {
                return true;
            }
            else
            {
                return false;
            }
        }