private void BindBranchDetailsList() { if (ddlSelectBranch.Items.Count > 0) { ddlSelectBranch.Items.Clear(); } ddlSelectBranch.DataSource = bre.BranchDetails(); ddlSelectBranch.DataTextField = "BranchCode"; ddlSelectBranch.DataValueField = "BranchId"; ddlSelectBranch.DataBind(); ddlSelectBranch.Items.Insert(0, MudarApp.AddListItem("Select", "0")); }
/// <summary> /// Create By :Aslam /// Create Date: 7/2/2012 /// Modified By : /// Modified Date: /// Describtion: update the change done in "divAddBranch" /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnBranSubmit_Click(object sender, EventArgs e) { string bid = string.Empty; string pBranchID = string.Empty; //if (ddlParentList.Items.Count > 0) // pBranchID = ddlParentList.SelectedValue; if (string.IsNullOrEmpty(txtBranchID.Text)) { bid = bre.BranchDetails(txtBranchID.Text, txtBranchCode.Text, txtBranchName.Text, cbSales.Checked, cbExports.Checked, cbWareHouse.Checked, cbOther.Checked, txtContactPerson.Text, txtPhoneorFax.Text, txtMobile.Text, txtEmail.Text, txtWebsite.Text, txtBankName.Text, txtBankACno.Text, txtBankADCCode.Text, txtIECode.Text, txtFDA.Text, txtAPVAT.Text, txtAddress.Text, txtCity.Text, txtTaluk.Text, txtDistrict.Text, txtState.Text, txtCountry.Text, pBranchID, "Shaik Aslam", DateTime.UtcNow, "", DateTime.UtcNow, 1, Convert.ToInt32(txtOrganicPremium.Text), txtTin.Text); } else { bid = bre.BranchDetails(txtBranchID.Text, txtBranchCode.Text, txtBranchName.Text, cbSales.Checked, cbExports.Checked, cbWareHouse.Checked, cbOther.Checked, txtContactPerson.Text, txtPhoneorFax.Text, txtMobile.Text, txtEmail.Text, txtWebsite.Text, txtBankName.Text, txtBankACno.Text, txtBankADCCode.Text, txtIECode.Text, txtFDA.Text, txtAPVAT.Text, txtAddress.Text, txtCity.Text, txtTaluk.Text, txtDistrict.Text, txtState.Text, txtCountry.Text, pBranchID, "Shaik Aslam", DateTime.UtcNow, "Shaik Aslam", DateTime.UtcNow, 2, Convert.ToInt32(txtOrganicPremium.Text), txtTin.Text); } BindBranchDetails(); BranchclearControls(); divAddBranch.Visible = false; divBranchList.Visible = true; }