コード例 #1
0
ファイル: F25006.cs プロジェクト: CSSAdmin/TScan
        private void PreviousButton_Click(object sender, EventArgs e)
        {
            bool IsNext = false;

            if (this.parcelId > 0)
            {
                this.parcelDetailData = this.form25006Control.WorkItem.GetParcelDetails(this.parcelId, IsNext);//,this.IsNext
                parcelId = Convert.ToInt32(this.parcelDetailData.f25006_ParcelNavigation.Rows[0][this.parcelDetailData.f25006_ParcelNavigation.ParcelIDColumn].ToString());
                //this.parcelId = this.nextParcelId;
                if (this.parcelDetailData != null)
                {
                    if (this.parcelDetailData.Tables[0].Rows.Count == 0)
                    {
                        this.NextButton.BackgroundImage     = global::D20000.Properties.Resources.Arrow_Right_Disabled;
                        this.PreviousButton.BackgroundImage = global::D20000.Properties.Resources.Arrow_Left_Disabled;
                    }
                    else
                    {
                        this.PreviousButton.BackgroundImage = global::D20000.Properties.Resources.Arrow_Left;
                        this.NextButton.BackgroundImage     = global::D20000.Properties.Resources.Arrow_Right;
                        this.Cursor = Cursors.WaitCursor;
                        FormInfo formInfo;
                        formInfo = TerraScanCommon.GetFormInfo(30000);
                        formInfo.optionalParameters = new object[1];
                        //formInfo.optionalParameters[0] = this.masterFormNo;
                        formInfo.optionalParameters[0] = this.parcelId;
                        this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
                    }
                }
            }
        }
コード例 #2
0
ファイル: F9101.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// Handles the LinkClicked event of the MasterNameLinkLabel control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
        private void MasterNameLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                ///Changes to open the form Name\Address Management Form for the CO:10531
                ////Master Name Address Form - FormID - 91000
                FormInfo formInfo = TerraScanCommon.GetFormInfo(91000);
                formInfo.optionalParameters = new object[] { null };
                this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
                this.Close();



                //Form form9100 = new Form();
                //form9100 = this.form9101Control.WorkItem.Services.Get<TerraScan.Infrastructure.Interface.Services.IFormEngineService>().GetForm(91000, null, this.F9101Controll.WorkItem);

                //if (form9100 != null)
                //{
                //    form9100.ShowDialog();
                //}
            }
            catch (Exception)
            {
                ErrorEngine.ShowForm((int)TerraScanCommon.ErrorEngineType.Six);
            }
            finally
            {
                this.MasterNameDataGridView.Focus();
            }
        }
コード例 #3
0
ファイル: F8902.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// Delete Header Properties
        /// </summary>
        private void DeleteHeaderProperties()
        {
            DialogResult dialogResult;

            this.Cursor = Cursors.WaitCursor;
            this.workOrderHeaderData = this.form8902Control.WorkItem.GetHeader(this.workId);

            if (this.workOrderHeaderData.Rows.Count > 0)
            {
                dialogResult = MessageBox.Show(SharedFunctions.GetResourceString("F8902WorkOrderConfirmDelete"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dialogResult == DialogResult.Yes)
                {
                    this.form8902Control.WorkItem.DeleteHeader(this.workId, TerraScanCommon.UserId);
                    this.deleteMessageResult = true;

                    FormInfo formInform;
                    formInform = TerraScanCommon.GetFormInfo(this.masterFormNo);
                    this.ShowForm(this, new DataEventArgs <FormInfo>(formInform));
                    SliceFormCloseAlert sliceFormCloseAlert;
                    sliceFormCloseAlert.FormNo        = this.masterFormNo;
                    sliceFormCloseAlert.FlagFormClose = true;
                    this.FormSlice_FormCloseAlert(this, new DataEventArgs <SliceFormCloseAlert>(sliceFormCloseAlert));
                }
                else if (dialogResult == DialogResult.No)
                {
                    this.deleteMessageResult = false;
                    return;
                }
            }
            this.Cursor = Cursors.Default;
        }
コード例 #4
0
        /// <summary>
        /// StatemantNumberLinkLabel_LinkClicked
        /// </summary>
        /// <param name="sender">The Sender</param>
        /// <param name="e">EventArgs</param>
        private void StatemantNumberLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                FormInfo formInfo;

                if (!string.IsNullOrEmpty(this.form15016StatementHeaderData.f15016StatementHeaderSlim.Rows[0][this.form15016StatementHeaderData.f15016StatementHeaderSlim.FormColumn].ToString()))
                {
                    formInfo = TerraScanCommon.GetFormInfo(int.Parse(this.form15016StatementHeaderData.f15016StatementHeaderSlim.Rows[0][this.form15016StatementHeaderData.f15016StatementHeaderSlim.FormColumn].ToString()));
                }
                else
                {
                    formInfo = TerraScanCommon.GetFormInfo(1020);
                }

                formInfo.optionalParameters    = new object[1];
                formInfo.optionalParameters[0] = this.keyID;
                this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
            }
            catch (Exception e1)
            {
                ExceptionManager.ManageException(e1, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
コード例 #5
0
        /// <summary>
        /// Handles the DoubleClickCell event of the DepreciationControlDataGrid control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:Infragistics.Win.UltraWinGrid.DoubleClickCellEventArgs"/> instance containing the event data.</param>
        private void DepreciationControlDataGrid_DoubleClickCell(object sender, DoubleClickCellEventArgs e)
        {
            try
            {
                if ((e.Cell.Column.Index == this.DepreciationControlDataGrid.DisplayLayout.Bands[0].Columns[this.listDeprControlItemsDataTable.Low1Column.ColumnName].Index) || (e.Cell.Column.Index == this.DepreciationControlDataGrid.DisplayLayout.Bands[0].Columns[this.listDeprControlItemsDataTable.Low2Column.ColumnName].Index) || (e.Cell.Column.Index == this.DepreciationControlDataGrid.DisplayLayout.Bands[0].Columns[this.listDeprControlItemsDataTable.Low3Column.ColumnName].Index) || (e.Cell.Column.Index == this.DepreciationControlDataGrid.DisplayLayout.Bands[0].Columns[this.listDeprControlItemsDataTable.Low4Column.ColumnName].Index) || (e.Cell.Column.Index == this.DepreciationControlDataGrid.DisplayLayout.Bands[0].Columns[this.listDeprControlItemsDataTable.Low5Column.ColumnName].Index) || (e.Cell.Column.Index == this.DepreciationControlDataGrid.DisplayLayout.Bands[0].Columns[this.listDeprControlItemsDataTable.Low6Column.ColumnName].Index))
                {
                    ////on double click the drop down will not come
                    ////F36060 form slice is called
                    e.Cell.DroppedDown = false;

                    int deprtableId = 0;

                    if (e.Cell.Value != null)
                    {
                        int.TryParse(e.Cell.Value.ToString(), out deprtableId);
                    }

                    if (deprtableId > 0)
                    {
                        FormInfo formInfo;
                        formInfo = TerraScanCommon.GetFormInfo(31060);
                        formInfo.optionalParameters    = new object[1];
                        formInfo.optionalParameters[0] = deprtableId;
                        this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
        }
コード例 #6
0
ファイル: F27007.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// DistrictlinkLabel2_LinkClicked
 /// </summary>
 /// <param name="sender">sender</param>
 /// <param name="e">e</param>
 private void DistrictlinkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         FormInfo formInfo;
         ////Added by Biju on 22/Jun/2009 to fix #1377
         Int64 districtID = 0;
         formInfo = TerraScanCommon.GetFormInfo(11002);
         formInfo.optionalParameters = new object[1];
         ////Added by Biju on 22/Jun/2009 to fix #1377
         if (this.form27007ParcelHeaderSlimData.f27007ParcelHeaderSlim.Rows.Count > 0)
         {
             Int64.TryParse(this.form27007ParcelHeaderSlimData.f27007ParcelHeaderSlim.Rows[0][this.form27007ParcelHeaderSlimData.f27007ParcelHeaderSlim.DistrictIDColumn].ToString(), out districtID);
         }
         ////till here
         formInfo.optionalParameters[0] = districtID;//Commented/Added by Biju on 22/Jun/2009 to fix #1377//this.keyID ;
         this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
     }
     catch (Exception e1)
     {
         ExceptionManager.ManageException(e1, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
コード例 #7
0
        /// <summary>
        /// Handles the LinkClicked event of the PostingsLink control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
        private void PostingsLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                if (this.PostId > 0)
                {
                    this.Cursor = Cursors.WaitCursor;
                    FormInfo formInfo;
                    formInfo = TerraScanCommon.GetFormInfo(90101);
                    formInfo.optionalParameters    = new object[2];
                    formInfo.optionalParameters[0] = this.Tag;
                    formInfo.optionalParameters[1] = this.PostId;
                    this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
                }

                ////int reportAuditId = 0;
                ////this.Cursor = Cursors.WaitCursor;
                ////reportAuditId = this.PostId;
                ////this.reportFileIdHashTable.Clear();
                ////this.reportFileIdHashTable.Add("ReportFileID", reportAuditId);
                ////TerraScanCommon.ShowReport(90101, TerraScan.Common.Reports.Report.ReportType.Preview, this.reportFileIdHashTable);
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
コード例 #8
0
ファイル: F15103.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Handles the CellContentClick event of the ReceiptOwnersDataGridView control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellEventArgs"/> instance containing the event data.</param>
 private void ReceiptOwnersDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.ColumnIndex == this.ReceiptOwnersDataGridView.Columns["OwnerName"].Index)
         {
             this.Cursor = Cursors.WaitCursor;
             FormInfo formInfo;
             if (e.RowIndex >= 0)
             {
                 formInfo = TerraScanCommon.GetFormInfo(91000);
                 formInfo.optionalParameters = new object[] { this.ReceiptOwnersDataGridView.Rows[e.RowIndex].Cells[this.form15103ReceiptOwnersData.ListReceiptOwners.OwnerIDColumn.ColumnName].Value };
                 this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
                 ////object[] optionalParameter = new object[] { this.ReceiptOwnersDataGridView.Rows[e.RowIndex].Cells[this.form15103ReceiptOwnersData.ListReceiptOwners.OwnerIDColumn.ColumnName].Value };
                 ////Form receiptOwners = new Form();
                 ////receiptOwners = TerraScanCommon.GetForm(91000, optionalParameter, this.form15103Control.WorkItem);
                 ////if (receiptOwners != null)
                 ////{
                 ////    receiptOwners.ShowDialog();
                 ////}
             }
         }
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
コード例 #9
0
ファイル: FormEngineService.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// Gets the smart part.
        /// </summary>
        /// <param name="formId">The form id.</param>
        /// <param name="optionalParameter">The optional parameter.</param>
        /// <param name="parentWorkItem">The parent work item.</param>
        /// <returns>The generated smartpart.</returns>
        public UserControl GetSmartPart(int formId, object[] optionalParameter, WorkItem parentWorkItem)
        {
            string      currentWorkItemName = string.Empty;
            UserControl currentSmartPart    = new UserControl();
            WorkItem    currentWorkItem     = new WorkItem();

            //// get the form information like formFile,permissions etc..
            FormInfo formInfo = TerraScanCommon.GetFormInfo(formId);

            if (!string.IsNullOrEmpty(formInfo.formFile))
            {
                currentWorkItemName = formInfo.formFile.Trim() + "WorkItem";
                //// check for the parent workitem contains the current workitem
                if (!parentWorkItem.Items.Contains(currentWorkItemName))
                {
                    ////create the instance of current smartpart.
                    currentSmartPart = CreateSmartPartInstance(formInfo.formFile, optionalParameter, currentWorkItemName, parentWorkItem);
                }
                else
                {
                    currentWorkItem  = (WorkItem)parentWorkItem.Items.Get(currentWorkItemName);
                    currentSmartPart = (UserControl)currentWorkItem.Items.Get(formInfo.formFile);
                    currentWorkItem.Terminate();
                    currentSmartPart.Dispose();
                    currentSmartPart = CreateSmartPartInstance(formInfo.formFile, optionalParameter, currentWorkItemName, parentWorkItem);
                }

                return(currentSmartPart);
            }
            else
            {
                ErrorEngine.ShowForm((int)TerraScanCommon.ErrorEngineType.Six);
                return(null);
            }
        }
コード例 #10
0
 /// <summary>
 /// Associate GridView Cellcontent Click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void AssociatedGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.ColumnIndex == this.AssociatedGridView.Columns["ReceiptNaumber"].Index)
         {
             int i = e.RowIndex;
             if (i >= 0)
             {
                 Form     associateReceiptsForm = new Form();
                 FormInfo formInfo;
                 formInfo = TerraScanCommon.GetFormInfo(11001);
                 formInfo.optionalParameters    = new object[2];
                 formInfo.optionalParameters[0] = this.form15100ReceiptHeaderData.GetAssociatedReceiptDetails.Rows[i][this.form15100ReceiptHeaderData.GetAssociatedReceiptDetails.ReceiptIDColumn];
                 this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
             }
         }
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
コード例 #11
0
        private void ImprovementDistrictLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            FormInfo formInfo = TerraScanCommon.GetFormInfo(1043);

            formInfo.optionalParameters = new object[] { 999 };
            this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
            this.Close();
        }
コード例 #12
0
ファイル: F35075.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// Handles the LinkClicked event of the OwnerLinkLabel control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
        private void OwnerLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            FormInfo formInfo;

            formInfo = TerraScanCommon.GetFormInfo(91000);
            formInfo.optionalParameters    = new object[1];
            formInfo.optionalParameters[0] = this.ownerid;
            this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
        }
コード例 #13
0
ファイル: F25055.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// Shows the sub form.
        /// </summary>
        /// <param name="formNumber">The form number.</param>
        /// <param name="keyId">The key id.</param>
        private void ShowSubForm(int formNumber, int keyId)
        {
            // Open the form using formNumber and specific keyid
            FormInfo formInfo;

            formInfo = TerraScanCommon.GetFormInfo(formNumber);
            formInfo.optionalParameters    = new object[1];
            formInfo.optionalParameters[0] = keyId;
            this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
        }
コード例 #14
0
ファイル: F32012.cs プロジェクト: CSSAdmin/TScan
        private void catalogForm_LinkFormOpened(object sender)
        {
            object[] optionalParameter = { this.ParcelId };
            FormInfo formInfo;

            formInfo = TerraScanCommon.GetFormInfo(3201);
            formInfo.optionalParameters    = new object[1];
            formInfo.optionalParameters[0] = this.ParcelId;
            this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
        }
コード例 #15
0
        /// <summary>
        /// LinkClickedEvent for OwnerStatusLinkLabel
        /// </summary>
        /// /// <param name="sender">sender</param>
        /// <param name="e">e</param>
        private void OwnerStatusLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                // Sets the SystemSnapShot Status in the State <91000SystemSnapShotLoaded>
                this.form9102Control.WorkItem.RootWorkItem.State["91000SystemSnapShotLoaded"] = true;

                LoadSystemSnapShotDetails currentLoadSystemSnapShotDetails;
                currentLoadSystemSnapShotDetails.MasterFormNO           = this.masterFormNo;
                currentLoadSystemSnapShotDetails.RecordsetType          = 1;
                currentLoadSystemSnapShotDetails.IsSystemSnapShotLoaded = true;
                currentLoadSystemSnapShotDetails.KeyIdColumnName        = this.ownerStatusData.OwnerStatusDetailsTable.OwnerIDColumn.ColumnName;
                currentLoadSystemSnapShotDetails.SnapShotXML            = this.GetSnapshotXML();
                //this.OnD9030_F9033_SetSystemSnapshotEvent(new TerraScan.Infrastructure.Interface.EventArgs<LoadSystemSnapShotDetails>(currentLoadSystemSnapShotDetails));
                this.systemSnapShotId = this.form9102Control.WorkItem.F9033_InsertSnapShotItems(TerraScanCommon.UserId, this.GetSnapshotXML());
                this.form9102Control.WorkItem.RootWorkItem.State["91000SystemSnapShotId"] = this.systemSnapShotId;
                //For bugid--278 Added by Malliga on 18/6/2008
                //if (!string.IsNullOrEmpty(this.OwnerStatusDataGridView.Rows[0].Cells["OwnerID"].Value.ToString()))
                //{
                //    this.ownerId = int.Parse(this.OwnerStatusDataGridView.Rows[0].Cells["OwnerID"].Value.ToString());
                //}

                // To Open SystemSnapShot Records in the corresponding Form-master
                if (this.systemSnapShotId > 0)
                {
                    FormInfo formInfo;
                    formInfo = TerraScanCommon.GetFormInfo(91000);
                    // this.OnD9030_F9033_SetSystemSnapshotEvent(new TerraScan.Infrastructure.Interface.EventArgs<LoadSystemSnapShotDetails>(currentLoadSystemSnapShotDetails));
                    formInfo.optionalParameters = new object[1];
                    //For bugid--278 Added by Malliga on 18/6/2008
                    //if (this.systemSnapShotId != 0)
                    //{
                    formInfo.optionalParameters[0] = this.systemSnapShotId;
                    //}
                    //else
                    //{
                    //    formInfo.optionalParameters[0] = this.ownerId;
                    //}

                    // Holds the SystemSnapshotId in the state variable <91000SystemSnapShotId>
                    this.form9102Control.WorkItem.RootWorkItem.State["91000SystemSnapShotId"] = this.systemSnapShotId;

                    this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));

                    this.form9102Control.WorkItem.RootWorkItem.State["91000SystemSnapShotId"] = null;
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm);
            }
        }
コード例 #16
0
ファイル: F1212.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Handles the Click event of the HistoryButton 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 HistoryButton_Click(object sender, EventArgs e)
 {
     try
     {
         FormInfo formInfo = TerraScanCommon.GetFormInfo(1213);
         this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
     }
     catch (Exception exc)
     {
         ExceptionManager.ManageException(exc, ExceptionManager.ActionType.Display, this.ParentForm);
     }
 }
コード例 #17
0
        /// <summary>
        /// To Call the street List management Form
        /// </summary>
        private void ToCallStreetListMangementForm()
        {
            ////if (this.currentStreetId > 0)
            ////{
            FormInfo formInfo;

            formInfo = TerraScanCommon.GetFormInfo(20011);
            formInfo.optionalParameters    = new object[1];
            formInfo.optionalParameters[0] = this.currentStreetId;
            this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
            //// }
        }
コード例 #18
0
        /// <summary>
        /// Handles the Panel TerraScanLinkLabel Click
        /// </summary>
        /// <param name="sender">sender</param>
        /// <param name="e">eventargs</param>
        private void PannelLinkLabel_Click(object sender, EventArgs e)
        {
            ////xpPanelGroup3.AutoSize = true;
            bool setParameter            = false;
            TerraScanLinkLabel linkLabel = new TerraScanLinkLabel();

            linkLabel = ((TerraScanLinkLabel)sender);
            linkLabel.Focus();
            FormInfo formInfo;

            formInfo = TerraScanCommon.GetFormInfo(linkLabel.FormId);

            if ((linkLabel.Tag != null) && bool.TryParse(linkLabel.Tag.ToString(), out setParameter))
            {
                if (setParameter)
                {
                    formInfo.optionalParameters    = new object[1];
                    formInfo.optionalParameters[0] = 999; //999; //-1;       ////purushotham to resolve bug //999;
                }
            }
            bool isFieldUser = TerraScanCommon.IsFieldUser;
            //bool isDatabaseAvailable = ScriptEngine.IsDatabaseAvailable();
            bool isDatabaseAvailable = TerraScanCommon.IsDataBaseAvailable;
            bool isOnLineMode        = WSHelper.IsOnLineMode;


            if (isFieldUser && isOnLineMode && linkLabel.FormId == 3230)
            {
                this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
            }
            else if ((isFieldUser && isDatabaseAvailable))
            {
                this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
            }
            else if ((((isFieldUser && isOnLineMode && !isDatabaseAvailable) && linkLabel.FormId != 3230)) ||
                     ((!isFieldUser && isOnLineMode) && linkLabel.FormId == 3230))
            {
                MessageBox.Show(SharedFunctions.GetResourceString("PermissionCheck"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if ((!isFieldUser && isOnLineMode) && linkLabel.FormId != 3230)
            {
                this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
            }

            if (isDatabaseAvailable && isFieldUser)
            {
                WSHelper.IsOnLineMode = false;
            }
            else
            {
                WSHelper.IsOnLineMode = true;
            }
        }
コード例 #19
0
        /// <summary>
        /// Handles the Click event of the CommentButton 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 CommentButton_Click(object sender, EventArgs e)
        {
            //// this.CommentButtonClick(this, new DataEventArgs<string>(string.Empty));

            try
            {
                this.Cursor = Cursors.WaitCursor;
                object[] optionalParameter;
                int      currentCommentForm;
                if (this.commentFormIdDiffers)
                {
                    currentCommentForm = this.commentFormId;
                }
                else
                {
                    currentCommentForm = this.currentFormId;
                }

                if (Convert.ToBoolean(TerraScanCommon.GetFormInfo(currentCommentForm).openPermission))
                {
                    optionalParameter = new object[] { currentCommentForm, this.keyId, this.parentFormId };

                    Form commentForm = new Form();
                    commentForm     = TerraScanCommon.GetForm(9075, optionalParameter, this.ParentWorkItem);
                    commentForm.Tag = currentCommentForm;

                    if (commentForm != null)
                    {
                        commentForm.ShowDialog();

                        // Code Need to be Modified to Set the Text For Attachmnent/Comment Button (Get the Count,Flag From Attachment/Comment Form Makin Public Propertis.
                        AdditionalOperationCountEntity additionalOperationCountEnt;
                        additionalOperationCountEnt = new AdditionalOperationCountEntity(-999, -999, false);
                        additionalOperationCountEnt.CommentCount = Convert.ToInt16(TerraScanCommon.GetValue(commentForm, "CommentCount"));
                        additionalOperationCountEnt.HighPriority = Convert.ToBoolean(TerraScanCommon.GetValue(commentForm, "HighPriorityFlag"));
                        this.SetText(additionalOperationCountEnt);
                    }
                }
                else
                {
                    MessageBox.Show(SharedFunctions.GetResourceString("OpenPermission"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
コード例 #20
0
 /// <summary>
 /// Handles the LinkClicked event of the CountyConfiglink control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
 private void CountyConfiglink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         FormInfo formInfo;
         formInfo = TerraScanCommon.GetFormInfo(9020);
         this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
 }
コード例 #21
0
ファイル: F1033.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Handle the Click event in Link Label
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
 private void SpecialDistrictLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         FormInfo formInfo = TerraScanCommon.GetFormInfo(10030);
         this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
         this.Close();
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
 }
コード例 #22
0
ファイル: F1060.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Handles the LinkClicked event of the SuspendedPaymentLinkLabel control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
 private void SuspendedPaymentLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         FormInfo formInfo;
         formInfo = TerraScanCommon.GetFormInfo(11035);
         this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
         this.Close();
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this);
     }
 }
コード例 #23
0
        private void CommentButton_Click(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                object[] optionalParameter;

                if (!this.ZoningSaveButton.Enabled)
                {
                    if (Convert.ToBoolean(TerraScanCommon.GetFormInfo(this.currentFormId).openPermission))
                    {
                        optionalParameter = new object[] { this.currentFormId, this.currentKeyId, 25003 };

                        Form commentForm = new Form();
                        commentForm     = this.form3040Control.WorkItem.Services.Get <TerraScan.Infrastructure.Interface.Services.IFormEngineService>().GetForm(9075, optionalParameter, this.form3040Control.WorkItem);
                        commentForm.Tag = this.currentFormId;

                        if (commentForm != null)
                        {
                            commentForm.ShowDialog();

                            // Code Need to be Modified to Set the Text For Attachmnent/Comment Button (Get the Count,Flag From Attachment/Comment Form Makin Public Propertis.
                            AdditionalOperationCountEntity additionalOperationCountEnt;
                            additionalOperationCountEnt = new AdditionalOperationCountEntity(-999, -999, false);
                            additionalOperationCountEnt.CommentCount = Convert.ToInt32(TerraScanCommon.GetValue(commentForm, "CommentCount"));
                            additionalOperationCountEnt.HighPriority = Convert.ToBoolean(TerraScanCommon.GetValue(commentForm, "HighPriorityFlag"));
                            this.SetText(additionalOperationCountEnt);
                        }
                    }
                    else
                    {
                        MessageBox.Show(SharedFunctions.GetResourceString("OpenPermission"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
                else
                {
                    MessageBox.Show(SharedFunctions.GetResourceString("Unsaved changes exists"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
コード例 #24
0
ファイル: F95010.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// T2s the form call.
 /// </summary>
 /// <param name="formId">The form id.</param>
 /// <param name="keyId">The key id.</param>
 public void T2FormCall(int formId, int keyId)
 {
     try
     {
         FormInfo formInfo;
         formInfo = TerraScanCommon.GetFormInfo(formId);
         formInfo.optionalParameters    = new object[1];
         formInfo.optionalParameters[0] = keyId;
         this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
 }
コード例 #25
0
ファイル: F15110.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Handles the LinkClicked event of the ReverseReceiptLinkLabel control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
 private void ReverseReceiptLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         FormInfo formInfo;
         formInfo = TerraScanCommon.GetFormInfo(11001);
         formInfo.optionalParameters    = new object[1];
         formInfo.optionalParameters[0] = this.ReverseReceiptLinkLabel.FormId;
         this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
 }
コード例 #26
0
ファイル: FormEngineService.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// Gets the form.
        /// </summary>
        /// <param name="formId">The form id.</param>
        /// <param name="optionalParameter">The optional parameter.</param>
        /// <param name="parentWorkItem">The parent work item.</param>
        /// <returns>The generated form</returns>
        public Form GetForm(int formId, object[] optionalParameter, WorkItem parentWorkItem)
        {
            string   currentWorkItemName = string.Empty;
            FormInfo formInfo;
            Form     currentForm     = new Form();
            WorkItem currentWorkItem = new WorkItem();

            //// get the form information like formFile,permissions etc..
            formInfo = TerraScanCommon.GetFormInfo(formId);

            if (!string.IsNullOrEmpty(formInfo.formFile))
            {
                try
                {
                    currentWorkItemName = formInfo.formFile.Trim() + "WorkItem";

                    //// check for the parent workitem contains the current workitem
                    if (!parentWorkItem.Items.Contains(currentWorkItemName))
                    {
                        ////create the instance of current form.
                        currentForm = this.CreateFormInstance(formInfo.formFile, optionalParameter, currentWorkItemName, parentWorkItem);
                    }
                    else
                    {
                        currentWorkItem = (WorkItem)parentWorkItem.Items.Get(currentWorkItemName);
                        currentForm     = (Form)currentWorkItem.Items.Get(formInfo.formFile);
                        currentWorkItem.Terminate();
                        currentForm.Dispose();
                        currentForm = this.CreateFormInstance(formInfo.formFile, optionalParameter, currentWorkItemName, parentWorkItem);
                    }

                    return(currentForm);
                }
                catch (Exception ex)
                {
                    if (!ex.Message.Equals("Cannot access a disposed object.\r\nObject name: 'Infragistics.Win.UltraWinGrid.UltraGridColumn'."))
                    {
                        ErrorEngine.ShowForm((int)TerraScanCommon.ErrorEngineType.Six, formId);
                    }
                    return(null);
                }
            }
            else
            {
                ErrorEngine.ShowForm((int)TerraScanCommon.ErrorEngineType.Six, formId);
                return(null);
            }
        }
コード例 #27
0
 /// <summary>
 /// Handles the LinkClicked event of the StateCodeManagementLinkLabel control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
 private void StateCodeManagementLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         /*Calls the Form 20004-Statecode Management*/
         FormInfo formInfo;
         formInfo = TerraScanCommon.GetFormInfo(20004);
         formInfo.optionalParameters    = new object[1];
         formInfo.optionalParameters[0] = this.keyId;
         this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm);
     }
 }
コード例 #28
0
ファイル: F1224.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Handles the LinkClicked event of the ComboLinkLabel control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
 private void ComboLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         FormInfo formInfo;
         formInfo = TerraScanCommon.GetFormInfo(1220);
         formInfo.optionalParameters    = new object[1];
         formInfo.optionalParameters[0] = this.RegisterId;
         this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
         this.PopulateUnPrintedChecksGrid(this.RegisterId);
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
 }
コード例 #29
0
ファイル: F2004.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// HelplinkLabel_LinkClicked
 /// </summary>
 /// <param name="sender">sender</param>
 /// <param name="e">e</param>
 private void HelplinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         FormInfo formInfo;
         formInfo = TerraScanCommon.GetFormInfo(0);
         formInfo.optionalParameters    = new object[1];
         formInfo.optionalParameters[0] = this.keyId;
         this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
         this.Cursor = Cursors.Arrow;
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
 }
コード例 #30
0
ファイル: F1224.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Calls to check detail.
 /// </summary>
 private void CallToCheckDetail()
 {
     try
     {
         FormInfo formInfo;
         formInfo = TerraScanCommon.GetFormInfo(1226);
         formInfo.optionalParameters    = new object[1];
         formInfo.optionalParameters[0] = this.MinCLIDError;
         this.ShowForm(this, new DataEventArgs <FormInfo>(formInfo));
         this.PopulateUnPrintedChecksGrid(this.RegisterId);
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
 }