Exemplo n.º 1
0
        private void btnComboRemoteName_D_Click(object sender, EventArgs e)
        {
            if (radioButtonEntity.Checked)
            {
                EFAssembly.EFClientToolsAssemblyAdapt.RemoteNameEditorDialog remoteNameEditorDialog = new EFAssembly.EFClientToolsAssemblyAdapt.RemoteNameEditorDialog();

                if (remoteNameEditorDialog.RemoteNameEditorDialogForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    tbComboRemoteName_D.Text = remoteNameEditorDialog.ReturnValue;
                    tbComboEntityName_D.Text = remoteNameEditorDialog.ReturnClassName;

                    List<object> refvals = WzdUtils.GetAllDataByTableName("SYS_REFVAL");
                    for (int i = 0; i < refvals.Count; i++)
                    {
                        if ((refvals[i] as SYS_REFVAL).REFVAL_NO == "SL." + tbComboEntityName_D.Text &&
                                lvSelectedFields.SelectedItems[0].Text == (refvals[i] as SYS_REFVAL).VALUE_MEMBER)
                        {
                            cbComboDisplayField_D.Text = (refvals[i] as SYS_REFVAL).DISPLAY_MEMBER;
                            cbComboValueField_D.Text = (refvals[i] as SYS_REFVAL).VALUE_MEMBER;
                            tbOtherFields_D.Text = (refvals[i] as SYS_REFVAL).SELECT_COMMAND;
                            break;
                        }
                    }
                }
            }
            else if (radioButtonInfoCommand.Checked)
            {
                string[] fSelectedList = new string[10];
                string strSelected = "";
                IGetValues aItem = (IGetValues)FInfoDataSet;
                FProviderNameList = aItem.GetValues("RemoteName");
                PERemoteName form = new PERemoteName(FProviderNameList, strSelected);
                if (form.ShowDialog() == DialogResult.OK)
                {
                    tbComboRemoteName_D.Text = form.RemoteName;

                    InfoDataSet ds = new InfoDataSet();
                    ds.SetWizardDesignMode(true);
                    ds.RemoteName = tbComboRemoteName_D.Text;
                    ds.ClearWhere();
                    ds.SetWhere("1=0");
                    ds.Active = true;
                    String DataSetName = ds.RealDataSet.Tables[0].TableName;
                    String ModuleName = ds.RemoteName.Substring(0, ds.RemoteName.IndexOf('.'));
                    String SolutionName = System.IO.Path.GetFileNameWithoutExtension(FDTE2.Solution.FullName);
                    tbComboEntityName_D.Text = CliUtils.GetTableName(ModuleName, DataSetName, SolutionName, "", true);

                    DataSet dsSYS_REFVAL = GetDataFromSYS_REFVAL(tbComboEntityName_D.Text, lvSelectedFields.SelectedItems[0].Text);
                    if (dsSYS_REFVAL.Tables.Count > 0 && dsSYS_REFVAL.Tables[0].Rows.Count > 0)
                    {
                        cbComboDisplayField_D.Text = dsSYS_REFVAL.Tables[0].Rows[0]["DISPLAY_MEMBER"].ToString();
                        cbComboValueField_D.Text = dsSYS_REFVAL.Tables[0].Rows[0]["VALUE_MEMBER"].ToString();
                        tbOtherFields_D.Text = dsSYS_REFVAL.Tables[0].Rows[0]["SELECT_COMMAND"].ToString();
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void btnRemoteName_Click(object sender, EventArgs e)
        {
            EFAssembly.EFClientToolsAssemblyAdapt.RemoteNameEditorDialog remoteNameEditorDialog = new EFAssembly.EFClientToolsAssemblyAdapt.RemoteNameEditorDialog();

            if (remoteNameEditorDialog.RemoteNameEditorDialogForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                tbRemoteName.Text = remoteNameEditorDialog.ReturnValue;
                tbCommandName.Text = remoteNameEditorDialog.SelectedCommandName;
                tbEntityName.Text = remoteNameEditorDialog.ReturnClassName;
                tbEntitySetName.Text = remoteNameEditorDialog.EntitySetName;
            }
        }
Exemplo n.º 3
0
        private void btnRemoteName_Click(object sender, EventArgs e)
        {
            try
            {
                EFAssembly.EFClientToolsAssemblyAdapt.RemoteNameEditorDialog remoteNameEditorDialog = new EFAssembly.EFClientToolsAssemblyAdapt.RemoteNameEditorDialog();

                if (remoteNameEditorDialog.RemoteNameEditorDialogForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    tbRemoteName.Text = remoteNameEditorDialog.ReturnValue;
                    tbCommandName.Text = remoteNameEditorDialog.SelectedCommandName;
                    tbEntityName.Text = remoteNameEditorDialog.ReturnClassName;
                    tbEntitySetName.Text = remoteNameEditorDialog.EntitySetName;
                }
            }
            catch (Exception ex)
            {
                WzdUtils.Application_ThreadException(null, new ThreadExceptionEventArgs(ex));
            }
        }
Exemplo n.º 4
0
        private void btnComboRemoteName_D_Click(object sender, EventArgs e)
        {
            EFAssembly.EFClientToolsAssemblyAdapt.RemoteNameEditorDialog remoteNameEditorDialog = new EFAssembly.EFClientToolsAssemblyAdapt.RemoteNameEditorDialog();

            if (remoteNameEditorDialog.RemoteNameEditorDialogForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                tbComboRemoteName_D.Text = remoteNameEditorDialog.ReturnValue;
                tbComboEntityName_D.Text = remoteNameEditorDialog.ReturnClassName;

                List<object> refvals = WzdUtils.GetAllDataByTableName("SYS_REFVAL");
                for (int i = 0; i < refvals.Count; i++)
                {
                    if ((refvals[i] as SYS_REFVAL).REFVAL_NO == "Auto." + tbComboEntityName_D.Text &&
                            lvSelectedFields.SelectedItems[0].Text == (refvals[i] as SYS_REFVAL).VALUE_MEMBER)
                    {
                        cbComboDisplayField_D.Text = (refvals[i] as SYS_REFVAL).DISPLAY_MEMBER;
                        cbComboValueField_D.Text = (refvals[i] as SYS_REFVAL).VALUE_MEMBER;
                        //tbOtherFields_D.Text = (refvals[i] as SYS_REFVAL).SELECT_COMMAND;
                        break;
                    }
                }
            }
        }