Ejemplo n.º 1
0
        /// <summary>
        /// Handles the Click event of the NewColumnButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
        private void NewColumnButton_Click(object sender, EventArgs e)
        {
            Form newColumnForm = new Form();
            try
            {
                UltraGridBand selectedBand = this.EngineFieldDataGrid.CurrentBand;
                if (null == selectedBand)
                {
                    return;
                }
                else
                {
                    //for (int i = 0; i < selectedBand.Columns.Count; i++)
                    //{
                    //    if (!selectedBand.Columns[i].IsVisibleInLayout)
                    //    {

                    //    }
                    //}
                }
                this.Cursor = Cursors.WaitCursor;

                newColumnForm = this.form9034Control.WorkItem.Services.Get<TerraScan.Infrastructure.Interface.Services.IFormEngineService>().GetForm(9035, null, this.form9034Control.WorkItem);

                if (newColumnForm != null)
                {
                    TerraScanCommon.SetValue(newColumnForm, "Band", selectedBand);

                    if (newColumnForm.ShowDialog() == DialogResult.OK)
                    {
                        this.queryGrid.DataSource = selectedBand;
                        this.SetFormSize(selectedBand.Columns.Count);
                        this.unsavedChangeExists = true;
                    }
                }

            }
            catch (InvalidCastException ex1)
            {
                ExceptionManager.ManageException(ex1, ExceptionManager.ActionType.Display, this);
            }
            catch (Exception ex)
            {
                throw;
                /*//MessageBox.Show(this, "Invalid Format " , ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);

                // return false;
                // ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this);*/
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Used Remove the Winodscount
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void sketchForm_Disposed(object sender, EventArgs e)
 {
     try
     {
         if (this.mdiChild)
         {
             Form mdiForm = ((Form)this.SetMDI);
             FormOpened = false;
             TerraScanCommon.SetValue(mdiForm, "DeActiveWindow", 3200);
         }
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Handles the BeforeColumnChooserDisplayed event of the ResultGridView control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:Infragistics.Win.UltraWinGrid.BeforeColumnChooserDisplayedEventArgs"/> instance containing the event data.</param>
 private void ResultGridView_BeforeColumnChooserDisplayed(object sender, BeforeColumnChooserDisplayedEventArgs e)
 {
     e.Cancel = true;
     try
     {
         this.Cursor = Cursors.WaitCursor;
         Form fieldManagementForm = new Form();
         fieldManagementForm = this.form9015Control.WorkItem.Services.Get <TerraScan.Infrastructure.Interface.Services.IFormEngineService>().GetForm(9034, null, this.form9015Control.WorkItem);
         TerraScanCommon.SetValue(fieldManagementForm, "Grid", this.ResultGridView);
         if (fieldManagementForm != null)
         {
             fieldManagementForm.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// RunButton Click
        /// </summary>
        /// <param name="sender">sender</param>
        /// <param name="e">EventArgs</param>
        private void RunButton_Click(object sender, EventArgs e)
        {
            try
            {
                string   formFile          = string.Empty;
                string   visibleName       = string.Empty;
                FormInfo getPermissionForm = new FormInfo();
                bool     isSlice;
                bool     isRoverFormShow = true;
                if (this.FormIDTextBox.Text.Trim() == "3230" && !TerraScanCommon.IsFieldUser)
                {
                    isRoverFormShow = false;
                }
                if (isRoverFormShow && !string.IsNullOrEmpty(this.FormIDTextBox.Text.Trim()))
                {
                    if (this.UserListCombo.SelectedIndex > 0)
                    {
                        #region Debug Mode Code //Added by Jyothi

                        if (TerraScanCommon.activateDebugMode.Equals(true) && TerraScanCommon.debugConfiguration.Equals(true))
                        {
                            SupportFormData.GetFormManagementDetailsDataTable getFormSlicesDetails = new SupportFormData.GetFormManagementDetailsDataTable();
                            FormInfo         getSliceFormPermission = new FormInfo();
                            string           optionalValues         = "";
                            string           formFileSlice          = string.Empty;
                            PermissionFields permissions1;

                            getFormSlicesDetails = F9017Controll.WorkItem.F9002_GetFormManagementDetails(Convert.ToInt32(FormIDTextBox.Text.Trim()), Convert.ToInt32(UserListCombo.SelectedValue.ToString()));

                            ////if (getFormSlicesDetails.Rows.Count == 3)
                            ////{
                            for (int count = 0; count < getFormSlicesDetails.Rows.Count; count++)
                            {
                                permissions1.newPermission           = Convert.ToBoolean(getFormSlicesDetails.Rows[count][getFormSlicesDetails.IsPermissionAddColumn.ColumnName].ToString());
                                getSliceFormPermission.addPermission = Convert.ToInt32(Convert.ToBoolean(getFormSlicesDetails.Rows[count][getFormSlicesDetails.IsPermissionAddColumn.ColumnName]));

                                permissions1.openPermission           = Convert.ToBoolean(getFormSlicesDetails.Rows[count][getFormSlicesDetails.IsPermissionOpenColumn.ColumnName].ToString());
                                getSliceFormPermission.openPermission = Convert.ToInt32(Convert.ToBoolean(getFormSlicesDetails.Rows[count][getFormSlicesDetails.IsPermissionOpenColumn.ColumnName]));

                                permissions1.editPermission           = Convert.ToBoolean(getFormSlicesDetails.Rows[count][getFormSlicesDetails.IsPermissionEditColumn.ColumnName].ToString());
                                getSliceFormPermission.editPermission = Convert.ToInt32(Convert.ToBoolean(getFormSlicesDetails.Rows[count][getFormSlicesDetails.IsPermissionEditColumn.ColumnName]));

                                permissions1.deletePermission           = Convert.ToBoolean(getFormSlicesDetails.Rows[count][getFormSlicesDetails.IsPermissionDeleteColumn.ColumnName].ToString());
                                getSliceFormPermission.deletePermission = Convert.ToInt32(Convert.ToBoolean(getFormSlicesDetails.Rows[count][getFormSlicesDetails.IsPermissionDeleteColumn.ColumnName]));

                                formFileSlice = getFormSlicesDetails.Rows[count][getFormSlicesDetails.FormFileColumn.ColumnName].ToString();
                                getSliceFormPermission.formFile = formFileSlice;

                                getSliceFormPermission.form = Convert.ToInt32(FormIDTextBox.Text.Trim());

                                if (getSliceFormPermission.optionalParameters != null)
                                {
                                    if (getSliceFormPermission.optionalParameters[0] != null)
                                    {
                                        optionalValues = optionalValues + "Key ID = " + getSliceFormPermission.optionalParameters[0] + "\n";
                                    }

                                    for (int iCount = 0; count < 3; iCount++)
                                    {
                                        if (getSliceFormPermission.optionalParameters[iCount] != null)
                                        {
                                            optionalValues = optionalValues + "Other Parameter " + iCount + " = " + getSliceFormPermission.optionalParameters[iCount] + "\n";
                                        }
                                    }
                                }

                                MessageBox.Show("Form: " + getSliceFormPermission.form + "\n" + "FormFile: " + getSliceFormPermission.formFile + "\n" + "Open Permission: " + Convert.ToBoolean(getSliceFormPermission.openPermission) + "\n" + "Add Permission: " + Convert.ToBoolean(getSliceFormPermission.addPermission) + "\n" + "Edit Permission: " + Convert.ToBoolean(getSliceFormPermission.editPermission) + "\n" + "Delete Permission: " + Convert.ToBoolean(getSliceFormPermission.deletePermission) + "\n" + optionalValues, ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                            }

                            TerraScanCommon.debugSliceConfiguration = true;
                            ////}
                        }

                        #endregion Debug Mode Code ////Ended by Jyothi

                        this.getFormDetailsDataDetails = this.F9017Controll.WorkItem.GetFormDetails(Convert.ToInt32(FormIDTextBox.Text.Trim()), Convert.ToInt32(UserListCombo.SelectedValue.ToString()));
                        if (this.getFormDetailsDataDetails.Rows.Count > 0)
                        {
                            this.permissions.newPermission  = Convert.ToBoolean(this.getFormDetailsDataDetails.Rows[0][this.getFormDetailsDataDetails.IsPermissionAddColumn.ColumnName].ToString());
                            getPermissionForm.addPermission = Convert.ToInt32(Convert.ToBoolean(this.getFormDetailsDataDetails.Rows[0][this.getFormDetailsDataDetails.IsPermissionAddColumn.ColumnName]));

                            this.permissions.openPermission  = Convert.ToBoolean(this.getFormDetailsDataDetails.Rows[0][this.getFormDetailsDataDetails.IsPermissionOpenColumn.ColumnName].ToString());
                            getPermissionForm.openPermission = Convert.ToInt32(Convert.ToBoolean(this.getFormDetailsDataDetails.Rows[0][this.getFormDetailsDataDetails.IsPermissionOpenColumn.ColumnName]));

                            this.permissions.editPermission  = Convert.ToBoolean(this.getFormDetailsDataDetails.Rows[0][this.getFormDetailsDataDetails.IsPermissionEditColumn.ColumnName].ToString());
                            getPermissionForm.editPermission = Convert.ToInt32(Convert.ToBoolean(this.getFormDetailsDataDetails.Rows[0][this.getFormDetailsDataDetails.IsPermissionEditColumn.ColumnName]));

                            this.permissions.deletePermission  = Convert.ToBoolean(this.getFormDetailsDataDetails.Rows[0][this.getFormDetailsDataDetails.IsPermissionDeleteColumn.ColumnName].ToString());
                            getPermissionForm.deletePermission = Convert.ToInt32(Convert.ToBoolean(this.getFormDetailsDataDetails.Rows[0][this.getFormDetailsDataDetails.IsPermissionDeleteColumn.ColumnName]));

                            formFile = this.getFormDetailsDataDetails.Rows[0][getFormDetailsDataDetails.FormFileColumn.ColumnName].ToString();
                            getPermissionForm.formFile = formFile;

                            visibleName = this.getFormDetailsDataDetails.Rows[0][getFormDetailsDataDetails.MenuNameColumn.ColumnName].ToString();
                            getPermissionForm.visibleName = visibleName;
                            getPermissionForm.form        = Convert.ToInt32(FormIDTextBox.Text.Trim());

                            isSlice = Convert.ToBoolean(this.getFormDetailsDataDetails.Rows[0][getFormDetailsDataDetails.IsSliceColumn.ColumnName].ToString());

                            if (!isSlice)
                            {
                                if (this.permissions.openPermission && Convert.ToBoolean(this.getFormDetailsDataDetails.Rows[0][getFormDetailsDataDetails.IsPermissionMenuColumn.ColumnName].ToString()))
                                {
                                    ////FormInfo getPermissionForm = TerraScan.Common.TerraScanCommon.GetFormInfo(Convert.ToInt32(FormIDTextBox.Text.Trim())); ////.GetForm(9002, optionalParameter, this.form9016Control.WorkItem);
                                    getPermissionForm.optionalParameters = new object[6];
                                    ////getPermissionForm.optionalParameters[0] = Convert.ToInt32(this.FormIDTextBox.Text.Trim());
                                    if (!string.IsNullOrEmpty(this.Parameter1TextBox.Text.Trim()))
                                    {
                                        ////string str1 = (str.Trim() = string.Empty ? "Hi" : "Bye");
                                        getPermissionForm.optionalParameters[0] = this.Parameter1TextBox.Text.Trim();

                                        if (!string.IsNullOrEmpty(this.Parameter2TextBox.Text.Trim()))
                                        {
                                            if (!string.IsNullOrEmpty(this.Parameter1TextBox.Text.Trim()))
                                            {
                                                getPermissionForm.optionalParameters[1] = this.Parameter2TextBox.Text.Trim();
                                            }
                                            else
                                            {
                                                MessageBox.Show(SharedFunctions.GetResourceString("InvalidKey"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                                                this.Parameter1TextBox.Focus();
                                                return;
                                            }
                                        }

                                        if (!string.IsNullOrEmpty(this.Parameter3TextBox.Text.Trim()))
                                        {
                                            if (!string.IsNullOrEmpty(this.Parameter1TextBox.Text.Trim()))
                                            {
                                                getPermissionForm.optionalParameters[2] = this.Parameter3TextBox.Text.Trim();
                                            }
                                            else
                                            {
                                                MessageBox.Show(SharedFunctions.GetResourceString("InvalidKey"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                                                this.Parameter1TextBox.Focus();
                                                return;
                                            }
                                        }

                                        if (!string.IsNullOrEmpty(this.Parameter4Textbox.Text.Trim()))
                                        {
                                            if (!string.IsNullOrEmpty(this.Parameter1TextBox.Text.Trim()))
                                            {
                                                getPermissionForm.optionalParameters[3] = this.Parameter4Textbox.Text.Trim();
                                            }
                                            else
                                            {
                                                MessageBox.Show(SharedFunctions.GetResourceString("InvalidKey"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                                                this.Parameter1TextBox.Focus();
                                                return;
                                            }
                                        }
                                    }
                                    else
                                    {
                                        if (!string.IsNullOrEmpty(this.Parameter2TextBox.Text.Trim()))
                                        {
                                            if (!string.IsNullOrEmpty(this.Parameter1TextBox.Text.Trim()))
                                            {
                                                getPermissionForm.optionalParameters[1] = this.Parameter2TextBox.Text.Trim();
                                            }
                                            else
                                            {
                                                MessageBox.Show(SharedFunctions.GetResourceString("InvalidKey"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                                                this.Parameter1TextBox.Focus();
                                                return;
                                            }
                                        }
                                        else if (!string.IsNullOrEmpty(this.Parameter3TextBox.Text.Trim()))
                                        {
                                            if (!string.IsNullOrEmpty(this.Parameter1TextBox.Text.Trim()))
                                            {
                                                getPermissionForm.optionalParameters[2] = this.Parameter3TextBox.Text.Trim();
                                            }
                                            else
                                            {
                                                MessageBox.Show(SharedFunctions.GetResourceString("InvalidKey"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                                                this.Parameter1TextBox.Focus();
                                                return;
                                            }
                                        }
                                        else if (!string.IsNullOrEmpty(this.Parameter4Textbox.Text.Trim()))
                                        {
                                            if (!string.IsNullOrEmpty(this.Parameter1TextBox.Text.Trim()))
                                            {
                                                getPermissionForm.optionalParameters[3] = this.Parameter4Textbox.Text.Trim();
                                            }
                                            else
                                            {
                                                MessageBox.Show(SharedFunctions.GetResourceString("InvalidKey"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                                                this.Parameter1TextBox.Focus();
                                                return;
                                            }
                                        }
                                    }

                                    getPermissionForm.optionalParameters[4] = this.permissions;
                                    getPermissionForm.optionalParameters[5] = this.UserListCombo.SelectedValue.ToString();
                                    ////getPermissionForm.formFile = formFile;
                                    ////getPermissionForm.visibleName = visibleName;
                                    ////getPermissionForm.openPermission = Convert.ToInt32(this.permissions.openPermission);
                                    TerraScanCommon.SupportFormUserId = Convert.ToInt32(this.UserListCombo.SelectedValue);

                                    /* Code For CAMA Sketh*/
                                    Boolean CAMAForm = false;
                                    int     objectID = 0;
                                    for (int CamaFormNo = 0; CamaFormNo < TerraScanCommon.CAMASketchFormDetails.Length; CamaFormNo++)
                                    {
                                        if (TerraScanCommon.CAMASketchFormDetails[CamaFormNo].Contains(FormIDTextBox.Text.Trim()))
                                        {
                                            CAMAForm = true;
                                        }
                                    }
                                    if (CAMAForm)
                                    {
                                        if (!String.IsNullOrEmpty(this.Parameter1TextBox.Text.Trim()))
                                        {
                                            Int32.TryParse(this.Parameter1TextBox.Text.Trim(), out objectID);
                                        }
                                        if (objectID > 0)
                                        {
                                            /* if (!formOpened)
                                             * {
                                             *   camaForm = new Form();
                                             *   camaForm = TerraScanCommon.ShowSketchForm(3200);
                                             *   Form mainFrm = new Form();
                                             *   mainFrm = (Form)((Form)this.ParentForm).ParentForm;
                                             *   foreach (Form f in mainFrm.MdiChildren)
                                             *   {
                                             *       if (f.Name == "CAMASketch")
                                             *       {
                                             *           f.Close();
                                             *           f.Dispose();
                                             *       }
                                             *   }
                                             * }
                                             * else
                                             * {
                                             *   if (formOpened)
                                             *   {
                                             *       //camaForm.Dispose();
                                             *       //camaForm.Close();
                                             *       camaForm = new Form();
                                             *       camaForm = TerraScanCommon.ShowSketchForm(3200);
                                             *       Form formAlreadyOpened = (Form)TerraScanCommon.GetObject(camaForm, "GetOpenedForm");
                                             *       formAlreadyOpened.Close();
                                             *       Boolean formClosed = (Boolean)TerraScanCommon.GetObject(camaForm, "FormOpened");
                                             *       formOpened = formClosed;
                                             *       if (!formClosed)
                                             *       {
                                             *           camaForm = TerraScanCommon.ShowSketchForm(3200);
                                             *       }
                                             *   }
                                             *   else
                                             *   {
                                             *       Form mainFrm = new Form();
                                             *       mainFrm = (Form)((Form)this.ParentForm).ParentForm;
                                             *       foreach (Form f in mainFrm.MdiChildren)
                                             *       {
                                             *           if (f.Name == "CAMASketch")
                                             *           {
                                             *               f.Dispose();
                                             *           }
                                             *
                                             *       }
                                             *   }
                                             * }*/

                                            this.camaForm = new Form();
                                            this.camaForm = TerraScanCommon.ShowSketchForm(3200);
                                            Form formAlreadyOpened = (Form)TerraScanCommon.GetObject(this.camaForm, "GetOpenedForm");
                                            if (formAlreadyOpened != null)
                                            {
                                                formAlreadyOpened.Close();
                                                Boolean formClosed = (Boolean)TerraScanCommon.GetObject(this.camaForm, "FormOpened");
                                                this.formOpened = formClosed;
                                                if (!formClosed)
                                                {
                                                    this.camaForm = TerraScanCommon.ShowSketchForm(3200);
                                                }
                                            }

                                            //if (!formOpened)
                                            //{
                                            TerraScanCommon.SetValue(camaForm, "SetObjectID", objectID);
                                            TerraScanCommon.SetValue(camaForm, "SetMDI", ((Form)((Form)this.ParentForm).ParentForm));
                                            //}
                                            formOpened = (Boolean)TerraScanCommon.GetObject(camaForm, "FormOpened");
                                        }
                                    }
                                    else
                                    {   ////Endshere
                                        this.ShowForm(this, new DataEventArgs <FormInfo>(getPermissionForm));
                                    }
                                }
                                else
                                {
                                    MessageBox.Show(SharedFunctions.GetResourceString("PermissionCheck"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                                    this.PreviewPanel.Visible = false;
                                    this.UserListCombo.Focus();
                                    ////this.FormIDTextBox.Text = string.Empty;
                                }
                            }
                            else
                            {
                                MessageBox.Show("Slice Form cannot be opened", ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                                this.PreviewPanel.Visible = false;
                                this.FormIDTextBox.Focus();
                            }
                        }
                        else
                        {
                            MessageBox.Show(SharedFunctions.GetResourceString("InvalidForm"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                            this.PreviewPanel.Visible = false;
                            this.FormIDTextBox.Focus();
                            ////this.FormIDTextBox.Text = string.Empty;
                        }
                    }
                    else
                    {
                        MessageBox.Show(SharedFunctions.GetResourceString("InvalidUser"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                        this.PreviewPanel.Visible = false;
                        this.UserListCombo.Focus();
                        ////this.UserListCombo.Focus();
                    }
                }
                else if (string.IsNullOrEmpty(this.FormIDTextBox.Text.Trim()))
                {
                    MessageBox.Show(SharedFunctions.GetResourceString("EmptyFormValue"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    this.PreviewPanel.Visible = false;
                    this.FormIDTextBox.Focus();
                    ////this.FormIDTextBox.Focus();
                }
                else
                {
                    MessageBox.Show("Current user do not have permission to acess this form.", ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (SoapException ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            finally
            {
                TerraScanCommon.SupportFormUserId = -1;
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Handles the MouseDoubleClick event of the F9034 control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
        private void F9034_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (e.X <= 222)
            {
                Form newColumnForm = new Form();
                try
                {
                    UltraGridColumn newcolumn;

                    newcolumn = this.EngineFieldDataGrid.CurrentSelectedItem as UltraGridColumn;

                    if (null == newcolumn)
                    {
                       // MessageBox.Show("Please select a custom column", ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }

                    if (newcolumn.IsBound)
                    {
                        MessageBox.Show("Please select a custom column", ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        ////MessageBox.Show(this, "Only unbound columns can be deleted.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }

                    UltraGridBand selectedBand = this.EngineFieldDataGrid.CurrentBand;

                    if (null == selectedBand)
                    {
                        return;
                    }

                    Hashtable addNewFieldsHashTable = new Hashtable();
                    addNewFieldsHashTable.Add("KeyName", newcolumn.Key);
                    addNewFieldsHashTable.Add("Type", newcolumn.DataType);
                    addNewFieldsHashTable.Add("Formula", newcolumn.Formula);
                    addNewFieldsHashTable.Add("Format", newcolumn.Format);
                    addNewFieldsHashTable.Add("Alignment", newcolumn.CellAppearance.TextHAlign);

                    this.Cursor = Cursors.WaitCursor;
                    ////column postion is sent
                    object[] optionalParameter = new object[] { addNewFieldsHashTable, newcolumn.Index };

                    newColumnForm = this.form9034Control.WorkItem.Services.Get<TerraScan.Infrastructure.Interface.Services.IFormEngineService>().GetForm(9035, optionalParameter, this.form9034Control.WorkItem);

                    if (newColumnForm != null)
                    {
                        TerraScanCommon.SetValue(newColumnForm, "Band", selectedBand);

                        if (newColumnForm.ShowDialog() == DialogResult.OK)
                        {
                            this.queryGrid.DataSource = selectedBand;
                            this.queryGrid.Refresh();
                        }
                    }
                }
                catch (InvalidCastException ex1)
                {
                    ExceptionManager.ManageException(ex1, ExceptionManager.ActionType.Display, this);
                }
                catch (Exception ex)
                {
                    throw;
                    /*//MessageBox.Show(this, "Invalid Format " , ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);

                    // return false;
                    // ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this);*/
                }
                finally
                {
                    this.Cursor = Cursors.Default;
                }
            }
        }