/// <summary> /// Edit Master /// </summary> /// <param name="rowIndex"></param> private void EditMaster(int rowIndex, double codeValue) { try { //AccountAdd addForm = new AccountAdd(this, codeValue); //addForm.ShowDialog(); AccountAdd addForm = new AccountAdd(this, codeValue); addForm.txtAccountType.Text = grdAccountDetails.Rows[rowIndex].Cells["AccountName"].Value.ToString(); addForm.ddlPrimaryGroup.SelectedValue = grdAccountDetails.Rows[rowIndex].Cells["AccountGroupMasId"].Value.ToString(); addForm.ddlAccountType.SelectedValue = grdAccountDetails.Rows[rowIndex].Cells["AccType"].Value.ToString(); addForm.txtBalance.Text = grdAccountDetails.Rows[rowIndex].Cells["Balance"].Value.ToString(); addForm.ddlDrCr.SelectedValue = grdAccountDetails.Rows[rowIndex].Cells["BalanceType"].Value.ToString(); // addForm.ddlDrCr.SelectedValue = grdAccountDetails.Rows[rowIndex].Cells["BalanceTypeName"].Value.ToString(); addForm.ddlState.SelectedValue = grdAccountDetails.Rows[rowIndex].Cells["State"].Value.ToString(); addForm.ddlSaleType.SelectedValue = grdAccountDetails.Rows[rowIndex].Cells["STypeCode"].Value.ToString(); addForm.ddlPurchaseType.SelectedValue = grdAccountDetails.Rows[rowIndex].Cells["PTypeCode"].Value.ToString(); addForm.txtAddress1.Text = grdAccountDetails.Rows[rowIndex].Cells["Address"].Value.ToString(); addForm.txtMobileNo.Text = grdAccountDetails.Rows[rowIndex].Cells["MobileNo"].Value.ToString(); addForm.txtEmail.Text = grdAccountDetails.Rows[rowIndex].Cells["EMail"].Value.ToString(); addForm.txtRegistration.Text = grdAccountDetails.Rows[rowIndex].Cells["RegistratnNo"].Value.ToString(); addForm.txtPLACodeNo.Text = grdAccountDetails.Rows[rowIndex].Cells["PLACodeNo"].Value.ToString(); addForm.txtCommodity.Text = grdAccountDetails.Rows[rowIndex].Cells["Commodity"].Value.ToString(); addForm.txtRange.Text = grdAccountDetails.Rows[rowIndex].Cells["Range"].Value.ToString(); addForm.txtDivision.Text = grdAccountDetails.Rows[rowIndex].Cells["Division"].Value.ToString(); addForm.txtCollactorate.Text = grdAccountDetails.Rows[rowIndex].Cells["Collectorate"].Value.ToString(); addForm.txtPanNo.Text = grdAccountDetails.Rows[rowIndex].Cells["PanNo"].Value.ToString(); addForm.txtCSTNo.Text = grdAccountDetails.Rows[rowIndex].Cells["CSTNo"].Value.ToString(); addForm.txtSTNo.Text = grdAccountDetails.Rows[rowIndex].Cells["TinSTNo"].Value.ToString(); addForm.txtECCNo.Text = grdAccountDetails.Rows[rowIndex].Cells["ECCNo"].Value.ToString(); addForm.txtCreditDays.Text = grdAccountDetails.Rows[rowIndex].Cells["CreditDays"].Value.ToString(); addForm.ddlAdjBillWise.SelectedValue = grdAccountDetails.Rows[rowIndex].Cells["AdjBillWise"].Value.ToString().ToLower() == "true" ? "1" : "0"; addForm.txtTDSRate.Text = grdAccountDetails.Rows[rowIndex].Cells["TDSRate"].Value.ToString(); addForm.txtTDSCategory.Text = grdAccountDetails.Rows[rowIndex].Cells["TDSCategory"].Value.ToString(); addForm.ddlLockAcc.SelectedValue = grdAccountDetails.Rows[rowIndex].Cells["LockAccount"].Value.ToString().ToLower() == "true" ? "1" : "0"; addForm.txtModeofTransport.Text = grdAccountDetails.Rows[rowIndex].Cells["ModeofTransport"].Value.ToString(); addForm.txtNatureofPay.Text = grdAccountDetails.Rows[rowIndex].Cells["NatureofPay"].Value.ToString(); addForm.txtVenderCode.Text = grdAccountDetails.Rows[rowIndex].Cells["VenderCode"].Value.ToString(); addForm.ddlTypeOfSupplier.SelectedValue = grdAccountDetails.Rows[rowIndex].Cells["typeOfSupplier"].Value.ToString(); addForm.txtCountry.Text = grdAccountDetails.Rows[rowIndex].Cells["Country"].Value.ToString(); addForm.txtDestination.Text = grdAccountDetails.Rows[rowIndex].Cells["Destination"].Value.ToString(); addForm.txtFax.Text = grdAccountDetails.Rows[rowIndex].Cells["Fax"].Value.ToString(); addForm.txtCodeNo.Text = grdAccountDetails.Rows[rowIndex].Cells["CodeNo"].Value.ToString(); addForm.txtDiscount.Text = grdAccountDetails.Rows[rowIndex].Cells["Discount"].Value.ToString(); addForm.ddlCustomerType.SelectedValue = grdAccountDetails.Rows[rowIndex].Cells["TypeofCustomer"].Value.ToString(); addForm.txtLocation.Text = grdAccountDetails.Rows[rowIndex].Cells["Location"].Value.ToString(); addForm.txtIntrestRate.Text = grdAccountDetails.Rows[rowIndex].Cells["InterestRate"].Value.ToString(); addForm.ddlActive.SelectedValue = grdAccountDetails.Rows[rowIndex].Cells["Active"].Value.ToString().ToLower() == "true" ? "1" : "0"; addForm.ShowDialog(); } catch (Exception exception) { ErrorLog.LogErrorInTxtFormat(exception); } }
private void btnSupplier_Click(object sender, EventArgs e) { AccountAdd sForm = new AccountAdd(); sForm.Show(); }
private void btnPartyName_Click(object sender, EventArgs e) { AccountAdd sForm = new AccountAdd(); sForm.Show(); }