Ejemplo n.º 1
0
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        Pos_Product pos_Product = new Pos_Product();

        pos_Product = Pos_ProductManager.GetPos_ProductByID(Int32.Parse(Request.QueryString["pos_ProductID"]));
        Pos_Product tempPos_Product = new Pos_Product();

        tempPos_Product.Pos_ProductID = pos_Product.Pos_ProductID;

        tempPos_Product.ProductID                 = Int32.Parse(ddlProduct.SelectedValue);
        tempPos_Product.ReferenceID               = Int32.Parse(ddlReference.SelectedValue);
        tempPos_Product.Pos_ProductTypeID         = Int32.Parse(ddlPos_ProductType.SelectedValue);
        tempPos_Product.Inv_UtilizationDetailsIDs = Int32.Parse(ddlInv_UtilizationDetails.SelectedValue);
        tempPos_Product.ProductStatusID           = Int32.Parse(ddlProductStatus.SelectedValue);
        tempPos_Product.ProductName               = txtProductName.Text;
        tempPos_Product.DesignCode                = txtDesignCode.Text;
        tempPos_Product.Pos_SizeID                = Int32.Parse(ddlPos_Size.SelectedValue);
        tempPos_Product.Pos_BrandID               = Int32.Parse(ddlPos_Brand.SelectedValue);
        tempPos_Product.Inv_QuantityUnitID        = Int32.Parse(ddlInv_QuantityUnit.SelectedValue);
        tempPos_Product.FabricsCost               = Decimal.Parse(txtFabricsCost.Text);
        tempPos_Product.AccesoriesCost            = Decimal.Parse(txtAccesoriesCost.Text);
        tempPos_Product.Overhead           = Decimal.Parse(txtOverhead.Text);
        tempPos_Product.OthersCost         = Decimal.Parse(txtOthersCost.Text);
        tempPos_Product.PurchasePrice      = Decimal.Parse(txtPurchasePrice.Text);
        tempPos_Product.SalePrice          = Decimal.Parse(txtSalePrice.Text);
        tempPos_Product.OldSalePrice       = Decimal.Parse(txtOldSalePrice.Text);
        tempPos_Product.Note               = txtNote.Text;
        tempPos_Product.BarCode            = txtBarCode.Text;
        tempPos_Product.Pos_ColorID        = Int32.Parse(ddlPos_Color.SelectedValue);
        tempPos_Product.Pos_FabricsTypeID  = Int32.Parse(ddlPos_FabricsType.SelectedValue);
        tempPos_Product.StyleCode          = txtStyleCode.Text;
        tempPos_Product.Pic1               = txtPic1.Text;
        tempPos_Product.Pic2               = txtPic2.Text;
        tempPos_Product.Pic3               = txtPic3.Text;
        tempPos_Product.VatPercentage      = Decimal.Parse(txtVatPercentage.Text);
        tempPos_Product.IsVatExclusive     = cbIsVatExclusive.Checked;
        tempPos_Product.DiscountPercentage = Decimal.Parse(txtDiscountPercentage.Text);
        tempPos_Product.DiscountAmount     = Decimal.Parse(txtDiscountAmount.Text);
        tempPos_Product.FabricsNo          = txtFabricsNo.Text;
        tempPos_Product.ExtraField1        = txtExtraField1.Text;
        tempPos_Product.ExtraField2        = txtExtraField2.Text;
        tempPos_Product.ExtraField3        = txtExtraField3.Text;
        tempPos_Product.ExtraField4        = txtExtraField4.Text;
        tempPos_Product.ExtraField5        = txtExtraField5.Text;
        tempPos_Product.ExtraField6        = txtExtraField6.Text;
        tempPos_Product.ExtraField7        = txtExtraField7.Text;
        tempPos_Product.ExtraField8        = txtExtraField8.Text;
        tempPos_Product.ExtraField9        = txtExtraField9.Text;
        tempPos_Product.ExtraField10       = txtExtraField10.Text;
        tempPos_Product.AddedBy            = Int32.Parse(txtAddedBy.Text);
        tempPos_Product.AddedDate          = DateTime.Now;
        tempPos_Product.UpdatedBy          = Int32.Parse(txtUpdatedBy.Text);
        tempPos_Product.UpdatedDate        = txtUpdatedDate.Text;
        tempPos_Product.RowStatusID        = Int32.Parse(ddlRowStatus.SelectedValue);
        bool result = Pos_ProductManager.UpdatePos_Product(tempPos_Product);

        Response.Redirect("AdminPos_ProductDisplay.aspx");
    }
Ejemplo n.º 2
0
    private void showPos_ProductData()
    {
        Pos_Product pos_Product = new Pos_Product();

        pos_Product = Pos_ProductManager.GetPos_ProductByID(Int32.Parse(Request.QueryString["pos_ProductID"]));

        ddlProduct.SelectedValue                = pos_Product.ProductID.ToString();
        ddlReference.SelectedValue              = pos_Product.ReferenceID.ToString();
        ddlPos_ProductType.SelectedValue        = pos_Product.Pos_ProductTypeID.ToString();
        ddlInv_UtilizationDetails.SelectedValue = pos_Product.Inv_UtilizationDetailsIDs.ToString();
        ddlProductStatus.SelectedValue          = pos_Product.ProductStatusID.ToString();
        txtProductName.Text               = pos_Product.ProductName;
        txtDesignCode.Text                = pos_Product.DesignCode;
        ddlPos_Size.SelectedValue         = pos_Product.Pos_SizeID.ToString();
        ddlPos_Brand.SelectedValue        = pos_Product.Pos_BrandID.ToString();
        ddlInv_QuantityUnit.SelectedValue = pos_Product.Inv_QuantityUnitID.ToString();
        txtFabricsCost.Text               = pos_Product.FabricsCost.ToString();
        txtAccesoriesCost.Text            = pos_Product.AccesoriesCost.ToString();
        txtOverhead.Text                 = pos_Product.Overhead.ToString();
        txtOthersCost.Text               = pos_Product.OthersCost.ToString();
        txtPurchasePrice.Text            = pos_Product.PurchasePrice.ToString();
        txtSalePrice.Text                = pos_Product.SalePrice.ToString();
        txtOldSalePrice.Text             = pos_Product.OldSalePrice.ToString();
        txtNote.Text                     = pos_Product.Note;
        txtBarCode.Text                  = pos_Product.BarCode;
        ddlPos_Color.SelectedValue       = pos_Product.Pos_ColorID.ToString();
        ddlPos_FabricsType.SelectedValue = pos_Product.Pos_FabricsTypeID.ToString();
        txtStyleCode.Text                = pos_Product.StyleCode;
        txtPic1.Text                     = pos_Product.Pic1;
        txtPic2.Text                     = pos_Product.Pic2;
        txtPic3.Text                     = pos_Product.Pic3;
        txtVatPercentage.Text            = pos_Product.VatPercentage.ToString();
        cbIsVatExclusive.Checked         = pos_Product.IsFeature;
        txtDiscountPercentage.Text       = pos_Product.DiscountPercentage.ToString();
        txtDiscountAmount.Text           = pos_Product.DiscountAmount.ToString();
        txtFabricsNo.Text                = pos_Product.FabricsNo;
        txtExtraField1.Text              = pos_Product.ExtraField1;
        txtExtraField2.Text              = pos_Product.ExtraField2;
        txtExtraField3.Text              = pos_Product.ExtraField3;
        txtExtraField4.Text              = pos_Product.ExtraField4;
        txtExtraField5.Text              = pos_Product.ExtraField5;
        txtExtraField6.Text              = pos_Product.ExtraField6;
        txtExtraField7.Text              = pos_Product.ExtraField7;
        txtExtraField8.Text              = pos_Product.ExtraField8;
        txtExtraField9.Text              = pos_Product.ExtraField9;
        txtExtraField10.Text             = pos_Product.ExtraField10;
        txtAddedBy.Text                  = pos_Product.AddedBy.ToString();
        txtUpdatedBy.Text                = pos_Product.UpdatedBy.ToString();
        txtUpdatedDate.Text              = pos_Product.UpdatedDate;
        ddlRowStatus.SelectedValue       = pos_Product.RowStatusID.ToString();
    }