Esempio n. 1
0
        private void btnItemDesc_Click(object sender, EventArgs e)
        {
            ItemsAdd sForm = new ItemsAdd();

            sForm.Show();
        }
Esempio n. 2
0
        /// <summary>
        /// Edit Master
        /// </summary>
        /// <param name="rowIndex"></param>
        private void EditData(int rowIndex, double codeValue)
        {
            try
            {
                //AccountAdd addForm = new AccountAdd(this, codeValue);
                //addForm.ShowDialog();

                ItemsAdd addForm = new ItemsAdd(this, codeValue);


                addForm.txtDisplayName.Text        = grdItemMaster.Rows[rowIndex].Cells["DisplayName"].Value.ToString();
                addForm.txtAliasItemCode.Text      = grdItemMaster.Rows[rowIndex].Cells["AliasItemCode"].Value.ToString();
                addForm.txtPrintDescription.Text   = grdItemMaster.Rows[rowIndex].Cells["PrintDescription"].Value.ToString();
                addForm.txtBasicUnit.Text          = grdItemMaster.Rows[rowIndex].Cells["BasicUnit"].Value.ToString();
                addForm.txtPackage.Text            = grdItemMaster.Rows[rowIndex].Cells["Package"].Value.ToString();
                addForm.ddlGroupName.SelectedValue = grdItemMaster.Rows[rowIndex].Cells["GroupName"].Value.ToString();
                addForm.txtSaleRate.Text           = grdItemMaster.Rows[rowIndex].Cells["SaleRate"].Value.ToString();
                addForm.txtPurchaseRate.Text       = grdItemMaster.Rows[rowIndex].Cells["PurchaseRate"].Value.ToString();
                addForm.txtExportRate.Text         = grdItemMaster.Rows[rowIndex].Cells["ExportRate"].Value.ToString();
                addForm.txtStockRate.Text          = grdItemMaster.Rows[rowIndex].Cells["StockRate"].Value.ToString();
                addForm.ddlRT12Code.Text           = grdItemMaster.Rows[rowIndex].Cells["RT12Code"].Value.ToString();
                addForm.txtMRP.Text             = grdItemMaster.Rows[rowIndex].Cells["MRP"].Value.ToString();
                addForm.txtMRPRate.Text         = grdItemMaster.Rows[rowIndex].Cells["MRPRate"].Value.ToString();
                addForm.txtPlatingRate.Text     = grdItemMaster.Rows[rowIndex].Cells["PlatingRate"].Value.ToString();
                addForm.txtValue.Text           = grdItemMaster.Rows[rowIndex].Cells["Value"].Value.ToString();
                addForm.txtTraiffNo.Text        = grdItemMaster.Rows[rowIndex].Cells["TraiffNo"].Value.ToString();
                addForm.ddlActive.SelectedValue = grdItemMaster.Rows[rowIndex].Cells["Active"].Value.ToString().ToLower() == "true" ? "1" : "0";

                addForm.ddlTaxableItem.SelectedValue    = grdItemMaster.Rows[rowIndex].Cells["TaxableItem"].Value.ToString().ToLower() == "true" ? "1" : "0";
                addForm.ddlExciseRegister.SelectedValue = grdItemMaster.Rows[rowIndex].Cells["ExciseRegister"].Value.ToString();
                addForm.ddlItemType.SelectedValue       = grdItemMaster.Rows[rowIndex].Cells["ItemType"].Value.ToString();

                addForm.txtNonExciseStock.Text   = grdItemMaster.Rows[rowIndex].Cells["NonExciseStock"].Value.ToString();
                addForm.txtExciseRG1Stock.Text   = grdItemMaster.Rows[rowIndex].Cells["ExciseRG1Stock"].Value.ToString();
                addForm.txtExciseRG23AStock.Text = grdItemMaster.Rows[rowIndex].Cells["ExciseRG23AStock"].Value.ToString();
                addForm.txtExciseRG23CStock.Text = grdItemMaster.Rows[rowIndex].Cells["ExciseRG23CStock"].Value.ToString();

                addForm.txtTotalStock.Text   = grdItemMaster.Rows[rowIndex].Cells["TotalStock"].Value.ToString();
                addForm.txtMinQuantity.Text  = grdItemMaster.Rows[rowIndex].Cells["MinQuantity"].Value.ToString();
                addForm.txtMaxQty.Text       = grdItemMaster.Rows[rowIndex].Cells["MaxQty"].Value.ToString();
                addForm.txtReOrderLevel.Text = grdItemMaster.Rows[rowIndex].Cells["ReOrderLevel"].Value.ToString();
                addForm.txtNetWeight.Text    = grdItemMaster.Rows[rowIndex].Cells["NetWeight"].Value.ToString();
                addForm.txtCutWeight.Text    = grdItemMaster.Rows[rowIndex].Cells["CutWeight"].Value.ToString();
                addForm.txtGrossWeight.Text  = grdItemMaster.Rows[rowIndex].Cells["GrossWeight"].Value.ToString();
                addForm.txtLength.Text       = grdItemMaster.Rows[rowIndex].Cells["Length"].Value.ToString();

                addForm.txtWidth.Text                 = grdItemMaster.Rows[rowIndex].Cells["Width"].Value.ToString();
                addForm.txtBinPackageQty.Text         = grdItemMaster.Rows[rowIndex].Cells["BinPackageQty"].Value.ToString();
                addForm.txtFreeQtyBin.Text            = grdItemMaster.Rows[rowIndex].Cells["FreeQtyBin"].Value.ToString();
                addForm.txtAlternateUnit.Text         = grdItemMaster.Rows[rowIndex].Cells["AlternateUnit"].Value.ToString();
                addForm.txtConversionFormule1.Text    = grdItemMaster.Rows[rowIndex].Cells["ConversionFormule1"].Value.ToString();
                addForm.txtConversionFormule2.Text    = grdItemMaster.Rows[rowIndex].Cells["ConversionFormule2"].Value.ToString();
                addForm.ddlItemSpecCode.SelectedValue = grdItemMaster.Rows[rowIndex].Cells["ItemSpecificationCode"].Value.ToString();
                addForm.txtDescriptionForInvoice.Text = grdItemMaster.Rows[rowIndex].Cells["DescriptionForInvoice"].Value.ToString();

                addForm.txtRackNo.Text = grdItemMaster.Rows[rowIndex].Cells["RackNo"].Value.ToString();
                addForm.ddlMakeMRNJwAuto.SelectedValue = grdItemMaster.Rows[rowIndex].Cells["MakeMRNJwAuto"].Value.ToString().ToLower() == "true" ? "1" : "0";
                addForm.txtItemArea.Text             = grdItemMaster.Rows[rowIndex].Cells["ItemArea"].Value.ToString();
                addForm.txtFileName.Text             = grdItemMaster.Rows[rowIndex].Cells["FileName"].Value.ToString();
                addForm.txtMinOrderQty.Text          = grdItemMaster.Rows[rowIndex].Cells["MinOrderQty"].Value.ToString();
                addForm.txtLeadTime.Text             = grdItemMaster.Rows[rowIndex].Cells["LeadTime"].Value.ToString();
                addForm.ddlPackageType.SelectedValue = grdItemMaster.Rows[rowIndex].Cells["PackageType"].Value.ToString();

                addForm.txtCode.Text = grdItemMaster.Rows[rowIndex].Cells["Code"].Value.ToString();
                addForm.ddlRawMaterialUsed.SelectedValue = grdItemMaster.Rows[rowIndex].Cells["RawMaterialUsed"].Value.ToString();
                addForm.ddlPriceListName.SelectedValue   = grdItemMaster.Rows[rowIndex].Cells["PriceListName"].Value.ToString();
                addForm.txtRateFactor1.Text          = grdItemMaster.Rows[rowIndex].Cells["RateFactor1"].Value.ToString();
                addForm.txtRateFactor2.Text          = grdItemMaster.Rows[rowIndex].Cells["RateFactor2"].Value.ToString();
                addForm.txtRateFactor3.Text          = grdItemMaster.Rows[rowIndex].Cells["RateFactor3"].Value.ToString();
                addForm.txtRateFactor4.Text          = grdItemMaster.Rows[rowIndex].Cells["RateFactor4"].Value.ToString();
                addForm.ddlProcessName.SelectedValue = grdItemMaster.Rows[rowIndex].Cells["ProcessName"].Value.ToString();
                addForm.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }