protected void btnAdd_Click(object sender, EventArgs e)
    {
        Inv_ProductionConfiguration inv_ProductionConfiguration = new Inv_ProductionConfiguration();

        inv_ProductionConfiguration.ProductID      = Int32.Parse(ddlProduct.SelectedValue);
        inv_ProductionConfiguration.QualityValue   = Decimal.Parse(txtQualityValue.Text);
        inv_ProductionConfiguration.QualityUnitID  = Int32.Parse(ddlQualityUnit.SelectedValue);
        inv_ProductionConfiguration.QuantityValue  = Decimal.Parse(txtQuantityValue.Text);
        inv_ProductionConfiguration.QuantityUnitID = Int32.Parse(ddlQuantityUnit.SelectedValue);
        inv_ProductionConfiguration.RawMaterialID  = Int32.Parse(ddlRawMaterial.SelectedValue);
        inv_ProductionConfiguration.ExtraField1    = "";
        inv_ProductionConfiguration.ExtraField2    = "";
        inv_ProductionConfiguration.ExtraField3    = "";
        inv_ProductionConfiguration.ExtraField4    = "";
        inv_ProductionConfiguration.ExtraField5    = "";
        inv_ProductionConfiguration.AddedBy        = getLogin().LoginID;
        inv_ProductionConfiguration.AddedDate      = DateTime.Now;
        inv_ProductionConfiguration.UpdatedBy      = getLogin().LoginID;
        inv_ProductionConfiguration.UpdatedDate    = DateTime.Now;
        inv_ProductionConfiguration.RowStatusID    = 1;
        int resutl = Inv_ProductionConfigurationManager.InsertInv_ProductionConfiguration(inv_ProductionConfiguration);

        //Response.Redirect("AdminInv_ProductionConfigurationDisplay.aspx");
        showInv_ProductionConfigurationGrid();
        btnClear_Click(this, new EventArgs());
    }
Esempio n. 2
0
    private void addConfiguration()
    {
        if (txtConfigPerProductRequiredQuantity.Text != "0")
        {
            Inv_Item itemSelected = Inv_ItemManager.GetInv_ItemByID(int.Parse(ddlItem.SelectedValue));

            Inv_ProductionConfiguration inv_ProductionConfiguration = new Inv_ProductionConfiguration();

            inv_ProductionConfiguration.ProductID      = Int32.Parse(ddlProduct.SelectedValue);
            inv_ProductionConfiguration.QualityValue   = itemSelected.QualityValue;
            inv_ProductionConfiguration.QualityUnitID  = itemSelected.QualityUnitID;
            inv_ProductionConfiguration.QuantityValue  = Decimal.Parse(txtConfigPerProductRequiredQuantity.Text);
            inv_ProductionConfiguration.QuantityUnitID = itemSelected.QuantityUnitID;
            inv_ProductionConfiguration.RawMaterialID  = itemSelected.RawMaterialID;
            inv_ProductionConfiguration.ExtraField1    = "";
            inv_ProductionConfiguration.ExtraField2    = "";
            inv_ProductionConfiguration.ExtraField3    = "";
            inv_ProductionConfiguration.ExtraField4    = "";
            inv_ProductionConfiguration.ExtraField5    = "";
            inv_ProductionConfiguration.AddedBy        = getLogin().LoginID;
            inv_ProductionConfiguration.AddedDate      = DateTime.Now;
            inv_ProductionConfiguration.UpdatedBy      = getLogin().LoginID;
            inv_ProductionConfiguration.UpdatedDate    = DateTime.Now;
            inv_ProductionConfiguration.RowStatusID    = 1;
            int resutl = Inv_ProductionConfigurationManager.InsertInv_ProductionConfiguration(inv_ProductionConfiguration);

            trConfigPerProductRequiredQuantity.Visible = false;
        }
    }