private void btnAdd_Click(object sender, EventArgs e)
        {
            OVRClubNationInfoForm frmClubNationInfo = new OVRClubNationInfoForm(this.Name);

            frmClubNationInfo.DatabaseConnection = DatabaseConnection;
            frmClubNationInfo.m_nOperateType     = 1;
            frmClubNationInfo.m_emInfoType       = m_emInfoType;
            frmClubNationInfo.m_strLanguageCode  = m_strLanguageCode;
            frmClubNationInfo.ShowDialog();

            if (frmClubNationInfo.DialogResult == DialogResult.OK)
            {
                m_bModified = true;

                m_iSelRowIdx = dgvInfo.Rows.Count;
                switch (Convert.ToInt32(m_emInfoType))
                {
                case 0:
                    FillInfoGridOfNation();
                    return;

                case 1:
                    FillInfoGridOfClub();
                    return;

                case 2:
                    FillInfoGridOfColor();
                    return;

                case 4:
                    FillInfoGridOfNOC();
                    return;
                }
            }
        }
Example #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            int iSelRowsCount = dgvFederation.SelectedRows.Count;

            if (iSelRowsCount <= 0)
            {
                string strPromotion = LocalizationRecourceManager.GetString(this.Name, "Operation_Msg");
                DevComponents.DotNetBar.MessageBoxEx.Show(strPromotion);
                return;
            }
            int iSelRowIdx = dgvFederation.SelectedRows[0].Index;

            m_arySelIndex.Clear();
            m_arySelIndex.Add(iSelRowIdx);//修改的行号


            OVRClubNationInfoForm frmClubNationInfo = new OVRClubNationInfoForm(this.Name);

            frmClubNationInfo.DatabaseConnection = DatabaseConnection;
            frmClubNationInfo.m_nOperateType     = 2;
            frmClubNationInfo.m_strLanguageCode  = m_strActiveLanguageCode;

            if (m_iGroupType == 1)
            {
                frmClubNationInfo.m_emInfoType = EMInfoType.emFederation;
                frmClubNationInfo.m_iInfoID    = Convert.ToInt32(dgvFederation.Rows[iSelRowIdx].Cells["ID"].Value);
                frmClubNationInfo.m_strComment = dgvFederation.Rows[iSelRowIdx].Cells["Comment"].Value.ToString();
            }
            else if (m_iGroupType == 2)
            {
                frmClubNationInfo.m_emInfoType = EMInfoType.emNOC;
                frmClubNationInfo.m_strComment = "";
            }
            else if (m_iGroupType == 3)
            {
                frmClubNationInfo.m_emInfoType = EMInfoType.emClub;
                frmClubNationInfo.m_iInfoID    = Convert.ToInt32(dgvFederation.Rows[iSelRowIdx].Cells["ID"].Value);
                frmClubNationInfo.m_strComment = "";
            }
            else if (m_iGroupType == 4)
            {
                frmClubNationInfo.m_emInfoType        = EMInfoType.emDelegation;
                frmClubNationInfo.m_iInfoID           = Convert.ToInt32(dgvFederation.Rows[iSelRowIdx].Cells["ID"].Value);
                frmClubNationInfo.m_strComment        = "";
                frmClubNationInfo.m_strDelegationType = dgvFederation.Rows[iSelRowIdx].Cells["Type"].Value.ToString();
                frmClubNationInfo.m_strComment        = dgvFederation.Rows[iSelRowIdx].Cells["Comment"].Value.ToString();
            }
            frmClubNationInfo.m_strCode         = dgvFederation.Rows[iSelRowIdx].Cells["Code"].Value.ToString();
            frmClubNationInfo.m_strLanguageCode = dgvFederation.Rows[iSelRowIdx].Cells["LanguageCode"].Value.ToString();
            frmClubNationInfo.m_strLongName     = dgvFederation.Rows[iSelRowIdx].Cells["LongName"].Value.ToString();
            frmClubNationInfo.m_strShortName    = dgvFederation.Rows[iSelRowIdx].Cells["ShortName"].Value.ToString();
            frmClubNationInfo.ShowDialog();

            if (frmClubNationInfo.DialogResult == DialogResult.OK)
            {
                m_bFederationModify = true;
                ResetFederationList(m_iActiveDisciplineID, m_strActiveLanguageCode, m_iGroupType);
            }
        }
Example #3
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            OVRClubNationInfoForm frmClubNationInfo = new OVRClubNationInfoForm(this.Name);

            frmClubNationInfo.DatabaseConnection = DatabaseConnection;
            frmClubNationInfo.m_nOperateType     = 1;

            if (m_iGroupType == 1)
            {
                frmClubNationInfo.m_emInfoType = EMInfoType.emFederation;
            }
            else if (m_iGroupType == 2)
            {
                frmClubNationInfo.m_emInfoType = EMInfoType.emNOC;
            }
            else if (m_iGroupType == 3)
            {
                frmClubNationInfo.m_emInfoType = EMInfoType.emClub;
            }
            else if (m_iGroupType == 4)
            {
                frmClubNationInfo.m_emInfoType = EMInfoType.emDelegation;
            }
            frmClubNationInfo.m_strLanguageCode = m_strActiveLanguageCode;
            frmClubNationInfo.ShowDialog();

            if (frmClubNationInfo.DialogResult == DialogResult.OK)
            {
                m_arySelIndex.Clear();
                m_arySelIndex.Add(dgvFederation.RowCount);//增加的行号

                //m_iCurSelIdex = dgvFederation.RowCount;
                m_bFederationAdd_Del = true;
                ResetFederationList(m_iActiveDisciplineID, m_strActiveLanguageCode, m_iGroupType);
            }
        }
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dgvInfo.SelectedRows.Count <= 0)
            {
                return;
            }

            OVRClubNationInfoForm frmClubNationInfo = new OVRClubNationInfoForm(this.Name);

            frmClubNationInfo.DatabaseConnection = DatabaseConnection;
            frmClubNationInfo.m_nOperateType     = 2;
            frmClubNationInfo.m_emInfoType       = m_emInfoType;
            frmClubNationInfo.m_strLanguageCode  = m_strLanguageCode;

            int nRowIdx = dgvInfo.SelectedRows[0].Index;

            if (m_emInfoType == EMInfoType.emNation || m_emInfoType == EMInfoType.emColor)
            {
                frmClubNationInfo.m_iInfoID = Convert.ToInt32(dgvInfo.Rows[nRowIdx].Cells["ID"].Value);

                frmClubNationInfo.m_strLongName  = dgvInfo.Rows[nRowIdx].Cells["Long Name"].Value.ToString();
                frmClubNationInfo.m_strShortName = dgvInfo.Rows[nRowIdx].Cells["Short Name"].Value.ToString();
                frmClubNationInfo.m_strComment   = dgvInfo.Rows[nRowIdx].Cells["Comment"].Value.ToString();
            }
            else if (m_emInfoType == EMInfoType.emClub)
            {
                frmClubNationInfo.m_iInfoID      = Convert.ToInt32(dgvInfo.Rows[nRowIdx].Cells["ID"].Value);
                frmClubNationInfo.m_strCode      = dgvInfo.Rows[nRowIdx].Cells["Code"].Value.ToString();
                frmClubNationInfo.m_strLongName  = dgvInfo.Rows[nRowIdx].Cells["Long Name"].Value.ToString();
                frmClubNationInfo.m_strShortName = dgvInfo.Rows[nRowIdx].Cells["Short Name"].Value.ToString();
            }
            else if (m_emInfoType == EMInfoType.emNOC)
            {
                frmClubNationInfo.m_strCode      = dgvInfo.Rows[nRowIdx].Cells["NOC"].Value.ToString();
                frmClubNationInfo.m_strLongName  = dgvInfo.Rows[nRowIdx].Cells["Long Name"].Value.ToString();
                frmClubNationInfo.m_strShortName = dgvInfo.Rows[nRowIdx].Cells["Short Name"].Value.ToString();
            }
            frmClubNationInfo.ShowDialog();

            if (frmClubNationInfo.DialogResult == DialogResult.OK)
            {
                m_bModified = true;

                m_iSelRowIdx = nRowIdx;
                switch (Convert.ToInt32(m_emInfoType))
                {
                case 0:
                    FillInfoGridOfNation();
                    return;

                case 1:
                    FillInfoGridOfClub();
                    return;

                case 2:
                    FillInfoGridOfColor();
                    return;

                case 4:
                    FillInfoGridOfNOC();
                    return;
                }
            }
        }