Exemplo n.º 1
0
 private void comboBox1_SelectionChangeCommitted(Object sender, EventArgs e)
 {
     l = new Accessor.AtlanticCanvasLenght();
     l = comboBox1.SelectedItem as Accessor.AtlanticCanvasLenght;
     genericAtlanticCostingControl2.MaterialID = l.MaterialID;
     genericAtlanticCostingControl2.SetDisplay();
 }
        private void cmbLengthMaterial_SelectionChangeCommitted(Object sender, EventArgs e)
        {
            l = new Accessor.AtlanticCanvasLenght();
            l = cmbLengthMaterial.SelectedItem as Accessor.AtlanticCanvasLenght;

            materialID = l.MaterialID;
            tblMaterial mat = DataEngine.GetMaterial(materialID);

            lblFrame.Text      = mat.Name;
            lblMaterialID.Text = mat.MaterialID;

            costingSquareTwoFifty.MaterialID = l.MaterialID;
            costingSquareTwoFifty.SetDisplay();

            costingSquareAtwo.MaterialID = l.MaterialID;
            costingSquareAtwo.SetDisplay();

            costingFourFifty.MaterialID = l.MaterialID;
            costingFourFifty.SetDisplay();

            costingSquareFourFifty.MaterialID = l.MaterialID;
            costingSquareFourFifty.SetDisplay();

            costingPane.MaterialID = l.MaterialID;
            costingPane.SetDisplay();

            costingFiveFifty.MaterialID = l.MaterialID;
            costingFiveFifty.SetDisplay();

            SetDisplay();
        }
        private void SetDisplay()
        {
            l         = new Accessor.AtlanticCanvasLenght();
            l         = cmbLengthMaterial.SelectedItem as Accessor.AtlanticCanvasLenght;
            this.Size = new System.Drawing.Size(600, 450);
            string id = l.MaterialID;
            tblAtlanticCanvasLength o   = DataEngine.GetAtlanticLength(1, id);
            tblMaterial             mat = DataEngine.GetMaterial(id);



            cmbLengthMaterial.Hide();
            tabAtlanticCosting.Show();
        }
        /// <summary>
        /// Updates the db
        /// </summary>
        private void ApplyEdit()
        {
            l = new Accessor.AtlanticCanvasLenght();

            l.FrameLenght        = Convert.ToDecimal(lblFrameLength.Text);
            l.FrameWidth         = Convert.ToDecimal(lblFrameWidth.Text);
            l.NoOfFrames         = Convert.ToDecimal(lblNoFrames.Text);
            l.TotalUsedFrameCost = decimal.Parse(lblTotalUsedFrameCost.Text, System.Globalization.NumberStyles.Currency);
            l.TotalArea          = Convert.ToDecimal(lblFrameArea.Text);
            l.CanvasOverlap      = Convert.ToDecimal(lblCanvasOveralap.Text);
            l.TotalCanvasArea    = Convert.ToDecimal(lblTotalCanvasArea.Text);
            l.TotalFrameLength   = Convert.ToDecimal(lblTotalFrameArea.Text);

            d.SaveAtlanticLength(atlanticID, l);
        }
Exemplo n.º 5
0
 private void comboBox1_SelectedIndexChanged(Object sender, EventArgs e)
 {
     l = new Accessor.AtlanticCanvasLenght();
     l = comboBox1.SelectedItem as Accessor.AtlanticCanvasLenght;
 }
 private void cmbLengthMaterial_SelectedIndexChanged(Object sender, EventArgs e)
 {
     l = new Accessor.AtlanticCanvasLenght();
     l = cmbLengthMaterial.SelectedItem as Accessor.AtlanticCanvasLenght;
 }