private void LoadData()
        {
            EnableMode();

            SOMenu entity = new SOMenu();
            if (modeHead == ObjectState.Edit && !string.IsNullOrEmpty(keyCode))
            {
                //---Header
                entity.menu_id = Converts.ParseLong(keyCode);
                entity = ServiceProvider.MenuService.FindByKeys(entity, true);
                txtMenuCode.Text = entity.menu_code;
                txtMenuName.Text = entity.menu_name;
                txtMenuDescription.Text = entity.menu_description;
                chkActive.Checked = entity.active;

                //---Detail
                modeDetail = ObjectState.Add;
                InitialGridDetail();
                LoadDataDetail(0);
            }
            else
            {
                txtMenuCode.Text = string.Empty;
                txtMenuName.Text = string.Empty;
                txtMenuDescription.Text = string.Empty;
                chkActive.Checked = true;
            }

        }
        private SOMenu GetData()
        {
            SOMenu entity = new SOMenu();
            entity.menu_id = Converts.ParseLong(keyCode);
            entity.menu_code = txtMenuCode.Text;
            entity.menu_name = txtMenuName.Text;
            entity.menu_description = txtMenuDescription.Text;
            entity.menu_reference_id = null;
            entity.active = chkActive.Checked;
            entity.created_by = "SYSTEM";
            entity.created_date = DateTime.Now;
            entity.updated_by = "SYSTEM";
            entity.updated_date = DateTime.Now;

            return entity;
        }