Exemple #1
0
 protected void ddlVendorName_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlVendorName.SelectedIndex > 0)
     {
         SupplierTransaction sup      = new SupplierTransaction();
         Supplier            supplier = new Supplier();
         supplier                = sup.GetVendorDetailsByVendorId(connstring, ddlVendorName.SelectedItem.Value.Trim());
         txtAddress1.Text        = ((supplier.VendorAddress.Trim() == "") ? "No Data Available" : supplier.VendorAddress.Trim());
         txtAddress2.Text        = ((supplier.VendorAddress1.Trim() == "") ? "No Data Available" : supplier.VendorAddress1.Trim());
         txtContactPerson.Text   = ((supplier.ContactPerson.Trim() == "") ? "No Data Available" : supplier.ContactPerson.Trim());
         txtTelephoneNumber.Text = ((supplier.TelephoneNumber.Trim() == "") ? "No Data Available" : supplier.TelephoneNumber.Trim());
         txtEmailAddress.Text    = ((supplier.VendorEmail.Trim() == "") ? "No Data Available" : supplier.VendorEmail.Trim());
         lblMessage.Text         = "";
         hdnVendorId.Value       = ddlVendorName.SelectedItem.Value.Trim();
     }
     else
     {
         txtAddress1.Text        = "";
         txtAddress2.Text        = "";
         txtContactPerson.Text   = "";
         txtTelephoneNumber.Text = "";
         txtEmailAddress.Text    = "";
         lblMessage.Text         = "";
         hdnVendorId.Value       = "";
     }
 }