Ejemplo n.º 1
0
        /// <summary>
        /// F35002_s the type of the list adjustment.
        /// </summary>
        /// <param name="masterFromNo">The master from no.</param>
        /// <returns>Adjustment Types dataTable</returns>
        public static F35001ValueSliceHeaderData.ListAdjustmentTypeDataTable F35002_ListAdjustmentType(int?masterFromNo)
        {
            F35001ValueSliceHeaderData valueSliceHeaderData = new F35001ValueSliceHeaderData();
            Hashtable ht = new Hashtable();

            ht.Add("@Form", masterFromNo);
            Utility.LoadDataSet(valueSliceHeaderData.ListAdjustmentType, "f35002_pclst_AdjustmentType", ht);
            return(valueSliceHeaderData.ListAdjustmentType);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// F35001_s the get value slice header.
        /// </summary>
        /// <param name="valueSliceId">The value slice ID.</param>
        /// <returns>the DataSet with the Header and Adjustment Values.</returns>
        public static F35001ValueSliceHeaderData F35001_GetValueSliceHeader(int valueSliceId)
        {
            F35001ValueSliceHeaderData valueSliceHeaderData = new F35001ValueSliceHeaderData();
            Hashtable ht = new Hashtable();

            ht.Add("@ValueSliceID", valueSliceId);
            string[] tableName = new string[] { valueSliceHeaderData.GetValueSliceHeader.TableName };
            Utility.LoadDataSet(valueSliceHeaderData, "f35001_pcget_ValueSliceHeader", ht, tableName);
            return(valueSliceHeaderData);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Populates the value slice header details.
        /// </summary>
        private void PopulateValueSliceHeaderDetails()
        {
            this.pageLoadStatus          = true;
            this.valueSliceHeaderDataSet = this.Form35001Controll.WorkItem.F35001_GetValueSliceHeader(this.keyId);

            if (this.valueSliceHeaderDataSet.GetValueSliceHeader.Rows.Count > 0)
            {
                decimal outNewConstructionValue;
                this.SliceTypeTextBox.Text   = this.valueSliceHeaderDataSet.GetValueSliceHeader.Rows[0][this.valueSliceHeaderDataSet.GetValueSliceHeader.SliceTypeColumn.ColumnName].ToString();
                this.DescriptionTextBox.Text = this.valueSliceHeaderDataSet.GetValueSliceHeader.Rows[0][this.valueSliceHeaderDataSet.GetValueSliceHeader.DescriptionColumn.ColumnName].ToString();
                decimal.TryParse(this.valueSliceHeaderDataSet.GetValueSliceHeader.Rows[0][this.valueSliceHeaderDataSet.GetValueSliceHeader.NewConstructionColumn.ColumnName].ToString(), out outNewConstructionValue);
                this.NewConstValueTextBox.Text    = outNewConstructionValue.ToString("#,##0.00");
                this.tempNewConstructionValue     = outNewConstructionValue.ToString("0.00");
                this.WillValueCombo.SelectedValue = Convert.ToInt32(this.valueSliceHeaderDataSet.GetValueSliceHeader.Rows[0][this.valueSliceHeaderDataSet.GetValueSliceHeader.IsValueColumn.ColumnName]);
                this.WillRollCombo.SelectedValue  = Convert.ToInt32(this.valueSliceHeaderDataSet.GetValueSliceHeader.Rows[0][this.valueSliceHeaderDataSet.GetValueSliceHeader.IsRollColumn.ColumnName]);
            }
            else
            {
                this.ClearValueSliceHeader();
                this.LockControls(true);
            }

            // Added by Latha
            //if (this.NewConstValueTextBox.Text.Equals("0.00"))
            //{
            //    this.NewConstValueTextBox.ForeColor = System.Drawing.Color.Black;
            //}
            //else if (this.ConvertStringtoDec(this.AdjOtherTextBox.Text.Trim()) > 0)
            //{
            //    this.NewConstValueTextBox.ForeColor = System.Drawing.Color.FromArgb(0, 128, 0);
            //}
            if (this.NewConstValueTextBox.Text.Contains("("))
            {
                this.NewConstValueTextBox.ForeColor = System.Drawing.Color.FromArgb(128, 0, 0);
                ////Added by Biju on 08/Feb/2010 to fix #5877
                //decimal tempNewConstValue;
                //decimal.TryParse(this.NewConstValueTextBox.Text, out tempNewConstValue);
                ////till here
                ////Modified by Biju on 08/Feb/2010 to fix #5877
                //this.NewConstValueTextBox.Text = "(" + Decimal.Negate(tempNewConstValue ) + ")";
            }
            else
            {
                this.NewConstValueTextBox.ForeColor = System.Drawing.Color.Black;
            }
            // Ends here

            this.DescriptionTextBox.Focus();
            this.pageMode       = TerraScanCommon.PageModeTypes.View;
            this.pageLoadStatus = false;
        }