private void Update_Symbol()
        {
            Class.DanhMuc_KyHieuChamCong dm = new Class.DanhMuc_KyHieuChamCong();
            dm.SymbolCode    = txtCode.Text;
            dm.SymbolName    = txtName.Text;
            dm.PercentSalary = 0;
            dm.IsEdit        = false;
            dm.Description   = txtDescription.Text;
            if (txtCode.Enabled == true)
            {
                if (dm.Insert())
                {
                    Class.App.SaveSuccessfully();
                }
                else
                {
                    Class.App.SaveNotSuccessfully();
                }
            }
            else
            {
                if (dm.Update())
                {
                    Class.App.SaveSuccessfully();
                }
                else
                {
                    Class.App.SaveNotSuccessfully();
                }
            }

            Get_List_KyHieu();
        }
        private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Class.DanhMuc_KyHieuChamCong dm = new Class.DanhMuc_KyHieuChamCong();
            gridItem.DataSource = dm.CT_SYMBOL_GetList();
            int selectedrow = gridItemDetail.FocusedRowHandle;

            if (selectedrow > 0)
            {
                DataRow   dr    = gridItemDetail.GetDataRow(selectedrow);
                string    _code = dr["SymbolCode"].ToString();
                DataTable dt    = dm.GetSymbolByCode(_code);
                txtCode.Text        = dt.Rows[0]["SymbolCode"].ToString();
                txtName.Text        = dt.Rows[0]["SymbolName"].ToString();
                txtDescription.Text = dt.Rows[0]["Description"].ToString();
            }
            Update_Symbol();
        }
 private string call_Code_New()
 {
     Class.DanhMuc_KyHieuChamCong dm = new Class.DanhMuc_KyHieuChamCong();
     return(dm.GetNewCode());
 }
 private void Get_List_KyHieu()
 {
     Class.DanhMuc_KyHieuChamCong dmcc = new Class.DanhMuc_KyHieuChamCong();
     gridItem.DataSource = dmcc.CT_SYMBOL_GetList();
 }