예제 #1
0
        private void format_controls()
        {
            CControlFormat.setFormStyle(this, new CAppContext_201());
            this.KeyPreview = true;
            WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.TRANG_THAI_LAO_DONG,
                                                     WinFormControls.eTAT_CA.NO,
                                                     m_cbo_trang_thai_moi);
            //WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.LOAI_QUYET_DINH,
            //  WinFormControls.eTAT_CA.NO,
            //  m_cbo_loai_quyet_dinh);
            //
            BKI_HRM.DS.DS_CM_DM_TU_DIEN v_ds_loai_quyet_dinh = new BKI_HRM.DS.DS_CM_DM_TU_DIEN();
            BKI_HRM.US.US_CM_DM_TU_DIEN v_us_loai_quyet_dinh = new BKI_HRM.US.US_CM_DM_TU_DIEN();
            v_us_loai_quyet_dinh.FillDataset_load_loai_quyet_dinh(v_ds_loai_quyet_dinh, "Tất cả", "N");
            m_cbo_loai_quyet_dinh.DataSource    = v_ds_loai_quyet_dinh.CM_DM_TU_DIEN;
            m_cbo_loai_quyet_dinh.DisplayMember = CM_DM_TU_DIEN.TEN;
            m_cbo_loai_quyet_dinh.ValueMember   = CM_DM_TU_DIEN.ID;

            m_cmd_save.Visible    = true;
            m_cmd_refresh.Visible = true;
            m_cmd_exit.Visible    = true;
            m_cmd_save.Enabled    = true;
            m_cmd_refresh.Enabled = true;
            m_cmd_exit.Enabled    = true;

            load_cbo_ma_quyet_dinh();
        }
예제 #2
0
 private void set_initial_form_load()
 {
     m_obj_trans = get_trans_object(m_fg);
     WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.TRANG_THAI_LAO_DONG, WinFormControls.eTAT_CA.NO, m_cbo_trang_thai_ld);
     m_txt_tim_kiem.Text = "";
     load_data_2_grid();
     m_txt_tim_kiem.Text = "Nhập mã đơn vị, mã nhân viên, họ tên";
 }
 private void set_initial_form_load()
 {
     m_obj_trans = get_trans_object(m_fg);
     load_data_2_grid();
     WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.LOAI_HOP_DONG,
                                              WinFormControls.eTAT_CA.YES,
                                              m_cbo_loai_hop_dong);
 }
 private void set_initial_form_load()
 {
     m_obj_trans = get_trans_object(m_fg);
     WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.LOAI_HOP_DONG, WinFormControls.eTAT_CA.YES, m_cbo_loai_hop_dong);
     WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.TRANG_THAI_HOP_DONG, WinFormControls.eTAT_CA.YES, m_cbo_trang_thai_hop_dong);
     load_data_2_grid();
     m_fg.Select(1, (int)e_col_Number.MA_HOP_DONG);
 }
예제 #5
0
 private void fomat_control()
 {
     CControlFormat.setFormStyle(this);
     set_define_events();
     WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.NGACH,
                                              WinFormControls.eTAT_CA.NO,
                                              m_cbo_ngach);
 }
예제 #6
0
 private void set_initial_form_load()
 {
     m_obj_trans = get_trans_object(m_fg);
     WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.TRANG_THAI_DU_AN, WinFormControls.eTAT_CA.YES, m_cbo_trang_thai);
     WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.LOAI_DU_AN, WinFormControls.eTAT_CA.YES, m_cbo_loai_du_an);
     WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.CO_CHE, WinFormControls.eTAT_CA.YES, m_cbo_co_che);
     load_data_2_grid();
     m_cbo_tim_kiem_theo_ngay.SelectedIndex = 0;
 }
예제 #7
0
        private void insert_v_dm_chuc_vu()
        {
            f401_V_DM_CHUC_VU_DE v_fDE = new f401_V_DM_CHUC_VU_DE();

            v_fDE.display_for_insert();
            load_data_2_grid();
            v_fDE.get_us(ref m_us);
            WinFormControls.set_focus_for_grid(m_fg, m_us.strMA_CV, 1);
        }
예제 #8
0
 private void set_initial_form_load()
 {
     m_obj_trans    = get_trans_object(m_fg);
     m_obj_trans_ds = get_trans_object_ds(m_fg_danh_sach);
     WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.TRANG_THAI_LAO_DONG, WinFormControls.eTAT_CA.NO, m_cbo_ttld);
     load_data_2_cbo_don_vi_cap_tren();
     CGridUtils.ClearDataInGrid(m_fg_danh_sach);
     //load_data_2_grid();
 }
예제 #9
0
 private void set_initial_form_load()
 {
     m_obj_trans = get_trans_object(m_fg);
     load_data_2_grid();
     WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.TRANG_THAI_CHUC_VU,
                                              WinFormControls.eTAT_CA.YES,
                                              m_cbo_trang_thai);
     //load_data_2_cbo_trang_thai();
 }
예제 #10
0
        private void insert_v_dm_don_vi()
        {
            var v_fDE = new f102_v_dm_don_vi_de();

            v_fDE.display_for_insert();
            load_data_2_grid();
            //-- Focus to row edited
            //m_us.FillDataset(m_ds, "");
            WinFormControls.set_focus_for_grid(m_fg, m_us.strMA_DON_VI, (int)e_col_Number.MA_DON_VI);
        }
예제 #11
0
        private void insert_v_dm_cap_bac()
        {
            F603_dm_cap_bac_de v_fDE = new F603_dm_cap_bac_de();

            v_fDE.display_for_insert();
            //m_txt_tim_kiem.Text = "";
            load_data_2_grid();
            v_fDE.get_us(ref m_us);
            WinFormControls.set_focus_for_grid(m_fg, m_us.strMA_BAC, 2);
            //m_txt_tim_kiem.Text = m_str_tim_kiem;
        }
예제 #12
0
        private void insert_v_dm_quyet_dinh()
        {
            F600_V_DM_QUYET_DINH_DE v_fDE = new F600_V_DM_QUYET_DINH_DE();

            v_fDE.display_for_insert();

            load_data_2_grid();
            v_fDE.get_us(ref m_us);
            WinFormControls.set_focus_for_grid(m_grv_dm_quyet_dinh, m_us.strMA_QUYET_DINH, 2);

            //m_txt_tim_kiem.Text = m_str_tim_kiem;
        }
예제 #13
0
        private void load_data_2_cbo()
        {
            WinFormControls.load_data_to_cbo_tu_dien(BKI_HRM.WinFormControls.eLOAI_TU_DIEN.LOAI_QUYET_DINH, WinFormControls.eTAT_CA.YES, m_cbo_loai_quyet_dinh);
            DataTable v_dt = new DataTable();

            v_dt.TableName = "CBO_Source";

            DataColumn v_dc;

            v_dc          = v_dt.Columns.Add("SO_COT");
            v_dc.DataType = typeof(int);
            v_dc          = v_dt.Columns.Add("TEN_COT");
            v_dc.DataType = typeof(string);

            DataRow v_dr;

            v_dr    = v_dt.NewRow();
            v_dr[0] = TAT_CA;
            v_dr[1] = "---- Không tìm kiếm ----";
            v_dt.Rows.Add(v_dr);

            v_dr    = v_dt.NewRow();
            v_dr[0] = NGAY_KY;
            v_dr[1] = "Ngày ký";
            v_dt.Rows.Add(v_dr);

            v_dr    = v_dt.NewRow();
            v_dr[0] = NGAY_CO_HIEU_LUC;
            v_dr[1] = "Ngày có hiệu lực";
            v_dt.Rows.Add(v_dr);

            v_dr    = v_dt.NewRow();
            v_dr[0] = NGAY_HET_HIEU_LUC;
            v_dr[1] = "Ngày hết hiệu lực";
            v_dt.Rows.Add(v_dr);

            m_cbo_tim_kiem_theo.DisplayMember = "TEN_COT";
            m_cbo_tim_kiem_theo.ValueMember   = "SO_COT";
            m_cbo_tim_kiem_theo.DataSource    = v_dt;

            m_cbo_tim_kiem_theo.SelectedIndex = 0;
        }
예제 #14
0
        private void format_controls()
        {
            CControlFormat.setFormStyle(this, new CAppContext_201());
            CControlFormat.setC1FlexFormat(m_fg);
            CGridUtils.AddSave_Excel_Handlers(m_fg);
            CGridUtils.AddSearch_Handlers(m_fg);
            m_fg.Tree.Column = (int)e_col_Number.MA_DON_VI;
            //m_fg.Cols[(int) e_col_Number.TEN_DON_VI_CAP_TREN].Visible = false;
            m_fg.Tree.Style = TreeStyleFlags.ButtonBar;


            KeyPreview = true;
            //   m_fg.Cols[(int)e_col_Number.DIA_BAN].Visible = false;
            WinFormControls.load_data_to_cbo_tu_dien(BKI_HRM.WinFormControls.eLOAI_TU_DIEN.LOAI_DON_VI,
                                                     WinFormControls.eTAT_CA.YES, m_cbo_loaidv);
            WinFormControls.load_data_to_cbo_tu_dien(BKI_HRM.WinFormControls.eLOAI_TU_DIEN.CAP_DON_VI,
                                                     WinFormControls.eTAT_CA.YES, m_cbo_capdv);
            load_data_2_cbo_trang_thai();
            set_define_events();
        }
예제 #15
0
        private void load_data_to_cbo()
        {
            /**
             * Load data to combobox Loại quyết định
             */
            WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.LOAI_QUYET_DINH,
                                                     WinFormControls.eTAT_CA.NO,
                                                     m_cbo_loai_quyet_dinh);

            var v_ds = new DS_V_DM_CAP_BAC();
            var v_us = new US_V_DM_CAP_BAC();

            v_us.FillDataset(v_ds);

            /**
             * Load data to combobox Mã cấp bậc
             */
            m_cbo_ma_cap_bac.DataSource    = v_ds.V_DM_CAP_BAC;
            m_cbo_ma_cap_bac.DisplayMember = V_DM_CAP_BAC.MA_CAP_BAC;
            m_cbo_ma_cap_bac.ValueMember   = V_DM_CAP_BAC.ID;
        }
예제 #16
0
        private void insert_v_gd_chi_tiet_cap_bac()
        {
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_fg))
            {
                return;
            }
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_fg, m_fg.Row))
            {
                return;
            }
            if (m_fg.Rows[m_fg.Row].IsNode)
            {
                return;
            }
            grid2us_object(m_us, m_fg.Row);

            f106_v_gd_chi_tiet_cap_bac_DE v_fDE = new f106_v_gd_chi_tiet_cap_bac_DE();

            v_fDE.display_for_insert(m_us, m_ds);
            load_data_2_grid();
            WinFormControls.set_focus_for_grid(m_fg, m_us.strMA_NV, (int)e_col_Number.MA_NV);
        }
예제 #17
0
 private void load_cbo_ma_quyet_dinh()
 {
     WinFormControls.load_data_to_cbo_tu_dien(WinFormControls.eLOAI_TU_DIEN.MA_QUYET_DINH
                                              , WinFormControls.eTAT_CA.NO
                                              , m_cbo_ma_quyet_dinh);
 }
        private void load_data_2_grid()
        {
            m_us_1.FillDataset(m_ds_1);
            v_us_dm_tu_dien.FillDataset(v_ds_dm_tu_dien, "WHERE Id_loai_tu_dien = 5 AND ID <> 655");
            //1.tạo danh sách cột chức vụ
            m_fg.Cols.Count    = m_ds_1.DM_CHUC_VU.Rows.Count + 2;
            m_fg.Cols[0].Width = 150;
            //m_fg.Cols[1].Caption = "Trạng thái/Chức vụ";
            m_fg.Cols[1].Caption  = "Tổng";
            m_fg.Cols[1].UserData = 0;
            //m_fg.Cols[1].Style.ForeColor = Color.Black;
            for (int i = 2; i < m_fg.Cols.Count; i++)
            {
                m_fg.Cols[i].Caption  = m_ds_1.DM_CHUC_VU.Rows[i - 2][1].ToString();
                m_fg.Cols[i].UserData = m_ds_1.DM_CHUC_VU.Rows[i - 2][0];
            }
            //2. tạo danh sách dòng trạng thái
            m_fg.Rows.Count = v_ds_dm_tu_dien.CM_DM_TU_DIEN.Rows.Count + 1;
            //m_fg.Rows[1][0] = "Tổng";
            //m_fg.Rows[1].UserData = 0;
            for (int j = 1; j < m_fg.Rows.Count; j++)
            {
                m_fg.Rows[j][0]       = v_ds_dm_tu_dien.CM_DM_TU_DIEN.Rows[j - 1][3].ToString();
                m_fg.Rows[j].UserData = v_ds_dm_tu_dien.CM_DM_TU_DIEN.Rows[j - 1][0];
            }
            //3.Đưa dữ liệu lên lưới
            m_ds_rpt = new DS_RPT_CHUC_VU_TRANG_THAI();
            m_us_rpt.FillDatasetByProc(m_ds_rpt, m_dat_thoidiem.Value, CAppContext_201.getCurrentIDPhapnhan());


            for (int v_i_cur_col = m_fg.Cols.Fixed; v_i_cur_col < m_fg.Cols.Count; v_i_cur_col++)
            {
                //if((int.Parse(row[1].ToString())) == (int.Parse(m_fg.Cols[u].UserData.ToString())))
                for (int v_i_cur_row = m_fg.Rows.Fixed; v_i_cur_row < m_fg.Rows.Count; v_i_cur_row++)
                {
                    string v_str_id_chuc_vu    = m_fg.Cols[v_i_cur_col].UserData.ToString();
                    string v_str_id_trang_thai = m_fg.Rows[v_i_cur_row].UserData.ToString();


                    DataRow[] v_arr_dr
                        = m_ds_rpt.RPT_CHUC_VU_TRANG_THAI.Select(
                              RPT_CHUC_VU_TRANG_THAI.ID_CV + "="
                              + v_str_id_chuc_vu
                              + " AND "
                              + RPT_CHUC_VU_TRANG_THAI.ID_TRANG_THAI + "="
                              + v_str_id_trang_thai);
                    if (v_arr_dr.Length == 0)
                    {
                        continue;
                    }
                    m_fg[v_i_cur_row, v_i_cur_col] = v_arr_dr[0][RPT_CHUC_VU_TRANG_THAI.SO_LUONG];
                }
            }
            for (int v = 1; v < m_fg.Rows.Count; v++)
            {
                int sum = 0;
                for (int t = 2; t < m_fg.Cols.Count; t++)
                {
                    sum += Convert.ToInt32(m_fg.Rows[v][t]);
                }
                m_fg.Rows[v][1] = sum;
            }
            m_fg.SubtotalPosition = SubtotalPositionEnum.BelowData;
            m_fg.Tree.Column      = 0;
            m_fg.Tree.Style       = TreeStyleFlags.Simple;
            m_fg.Subtotal(AggregateEnum.Clear);
            for (int u = 1; u < m_fg.Cols.Count; u++)
            {
                m_fg.Subtotal(AggregateEnum.Sum, -1, -1, u, "Tổng");
            }
            m_fg.AutoSizeCols();
            WinFormControls.load_data_to_CheckboxCombobox(m_fg, m_cbc_choose_columns, load_invisible);
        }