Пример #1
0
        public static F9044SnapshotOperations GetSnapshotOperationCount(int OperationId, int LOSnapshotId, int ROSnapshotId, int UserId)
        {
            F9044SnapshotOperations snapshotCountDetails = new F9044SnapshotOperations();
            Hashtable ht = new Hashtable();

            ht.Add("@OperationID", OperationId);
            ht.Add("@LOSnapshotID", LOSnapshotId);
            ht.Add("@ROSnapshotID", ROSnapshotId);
            ht.Add("@UserID", UserId);
            Utility.LoadDataSet(snapshotCountDetails.f9044_pcget_SnapshotOperationCount, "f9044_pcget_SnapshotOperationCount", ht);
            return(snapshotCountDetails);
        }
Пример #2
0
        public static F9044SnapshotOperations GetSnapshotDetails(int FormNum, int UserId)
        {
            F9044SnapshotOperations snapshotDetails = new F9044SnapshotOperations();
            DataSet   ds = new DataSet();
            Hashtable ht = new Hashtable();

            ht.Add("@Form", FormNum);
            ht.Add("@UserID", UserId);
            string[] optionalParameter = new string[] { snapshotDetails.f9044_pcget_SnapshotOperations.TableName, snapshotDetails.f9044_pcget_Operations.TableName };
            Utility.LoadDataSet(snapshotDetails, "f9044_pcget_SnapshotOperations", ht, optionalParameter);
            // snapshotDetails.f9043_pcget_Operations = snapshotDetails.
            return(snapshotDetails);
        }
Пример #3
0
 /// <summary>
 /// Loads the snapshot details.
 /// </summary>
 public void LoadSnapshotDetails()
 {
     try
     {
         this.snapshotDetailsDataSet = this.form9044Control.WorkItem.GetSnapshotDetails(this.formNum, TerraScanCommon.UserId);
         if (snapshotDetailsDataSet.f9044_pcget_SnapshotOperations.Rows.Count > 0)
         {
             DataTable dtBottomGrid = new DataTable();
             dtBottomGrid = snapshotDetailsDataSet.f9044_pcget_SnapshotOperations.Copy();
             this.SnapshotoperationTopGrid.DataSource = snapshotDetailsDataSet.f9044_pcget_SnapshotOperations;
             this.SnapshotoperationTopGrid.DataBind();
             DataRow[] dr = snapshotDetailsDataSet.f9044_pcget_SnapshotOperations.Select("SnapshotID= '" + snapId + "'");
             foreach (DataRow drow in snapshotDetailsDataSet.f9044_pcget_SnapshotOperations)
             {
                 this.BottomSnapshotOperationGrid.DataSource = dtBottomGrid;
                 this.BottomSnapshotOperationGrid.DataBind();
                 int strIndex;
                 if (drow.ItemArray.Length > 0)
                 {
                     int intID = Convert.ToInt32(drow["SnapshotID"]);
                     if (snapId == intID)
                     {
                         strIndex = snapshotDetailsDataSet.f9044_pcget_SnapshotOperations.Rows.IndexOf(drow);
                         var ultraRow = this.SnapshotoperationTopGrid.Rows.GetRowWithListIndex(strIndex);
                         int index    = ultraRow.Index;
                         this.SnapshotoperationTopGrid.Rows[index].Cells[0].Activate();
                         this.SnapshotoperationTopGrid.Rows[index].Selected           = true;
                         this.SnapshotoperationTopGrid.ActiveRowScrollRegion.FirstRow = this.SnapshotoperationTopGrid.ActiveRow;
                     }
                 }
             }
             if (snapId > 0)
             {
                 LOSnapshotId = snapId;
             }
         }
         if (this.snapshotDetailsDataSet.f9044_pcget_Operations.Rows.Count > 0)
         {
             this.OperationComboBox.DataSource    = this.snapshotDetailsDataSet.f9044_pcget_Operations;
             this.OperationComboBox.DisplayMember = this.snapshotDetailsDataSet.f9044_pcget_Operations.OperationColumn.ColumnName;
             this.OperationComboBox.ValueMember   = this.snapshotDetailsDataSet.f9044_pcget_Operations.OperationIDColumn.ColumnName;
             this.bottomGridLabel.Text            = this.snapshotDetailsDataSet.f9044_pcget_Operations.Rows[0][this.snapshotDetailsDataSet.f9044_pcget_Operations.OperationDescriptionColumn.ColumnName].ToString();
             this.OperationId = this.OperationComboBox.SelectedIndex;
         }
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
 }
Пример #4
0
 /// <summary>
 /// Loads the record details.
 /// </summary>
 public void LoadRecordDetails()
 {
     if (this.LOSnapshotId > 0 && this.OperationId != null && this.ROSnapshotId > 0)
     {
         this.snapshotCountDataSet = this.form9044Control.WorkItem.GetSnapshotOperationCount(this.OperationId, this.LOSnapshotId, this.ROSnapshotId, TerraScanCommon.UserId);
         // this.snapshotDetailsDataSet.f9044_pcget_SnapshotOperationCount.Merge( this.form9044Control.WorkItem.GetSnapshotOperationCount(this.OperationId,this.LOSnapshotId,this.ROSnapshotId, TerraScanCommon.UserId).f9044_pcget_SnapshotOperationCount);
         if (this.snapshotCountDataSet.f9044_pcget_SnapshotOperationCount.Rows.Count > 0 && this.snapshotCountDataSet.f9044_pcget_SnapshotOperationCount.Rows.Count != null)
         {
             if (!string.IsNullOrEmpty(this.snapshotCountDataSet.f9044_pcget_SnapshotOperationCount.Rows[0][this.snapshotCountDataSet.f9044_pcget_SnapshotOperationCount.RecordsInCommonColumn.ColumnName].ToString()))
             {
                 this.RecorsInCommonTextBox.Text = this.snapshotCountDataSet.f9044_pcget_SnapshotOperationCount.Rows[0][this.snapshotCountDataSet.f9044_pcget_SnapshotOperationCount.RecordsInCommonColumn.ColumnName].ToString();
             }
             if (!string.IsNullOrEmpty(this.RecorsInNewSnapshotTextBox.Text = this.snapshotCountDataSet.f9044_pcget_SnapshotOperationCount.Rows[0][this.snapshotCountDataSet.f9044_pcget_SnapshotOperationCount.RecordsInNewSnapshotColumn.ColumnName].ToString()))
             {
                 this.RecorsInNewSnapshotTextBox.Text = this.snapshotCountDataSet.f9044_pcget_SnapshotOperationCount.Rows[0][this.snapshotCountDataSet.f9044_pcget_SnapshotOperationCount.RecordsInNewSnapshotColumn.ColumnName].ToString();
             }
         }
         //if(!string.IsNullOrEmpty(this.RecorsInCommonTextBox.Text) && (!string.IsNullOrEmpty(this.RecorsInNewSnapshotTextBox.Text)))
         //{
         //    this.RecordCount = Convert.ToInt32(this.RecorsInCommonTextBox.Text) + Convert.ToInt32(this.RecorsInNewSnapshotTextBox.Text);//this.RecorsInCommonTextBox.Text +
         //}
         if (!string.IsNullOrEmpty(this.RecorsInCommonTextBox.Text))
         {
             if (!string.IsNullOrEmpty(this.RecorsInNewSnapshotTextBox.Text))
             {
                 this.RecordCount = Convert.ToInt32(this.RecorsInCommonTextBox.Text) + Convert.ToInt32(this.RecorsInNewSnapshotTextBox.Text);//this.RecorsInCommonTextBox.Text +
             }
             else
             {
                 this.RecordCount = Convert.ToInt32(this.RecorsInCommonTextBox.Text);
             }
         }
         else
         {
             if (!string.IsNullOrEmpty(this.RecorsInNewSnapshotTextBox.Text))
             {
                 this.RecordCount = Convert.ToInt32(this.RecorsInNewSnapshotTextBox.Text);
             }
         }
         if (!string.IsNullOrEmpty(this.NewSnapShotNameTextBox.Text) && (this.LOSnapshotId > 0) && (this.OperationId != null) && (this.ROSnapshotId > 0) && (this.RecordCount > 0))
         {
             this.CreateSnapshotOperationButton.Enabled = true;
         }
         else
         {
             this.CreateSnapshotOperationButton.Enabled = false;
         }
     }
 }