protected void btnSearch_Click(object sender, EventArgs e) { try { CompanyDTO oCompanyDTO = new CompanyDTO(); string companyName = string.Empty; int companyType = 0; if (txtCompanyName.Text.Length > 0) { companyName = txtCompanyName.Text; } if (ddlCompanyType.SelectedIndex > 0) { companyType = ddlCompanyType.SelectedIndex; } oCompanyDTO = oWebApiCalls.CompanySearchByFilters(companyName, companyType); txtName.Text = oCompanyDTO.Name; txtAddress.Text = oCompanyDTO.Address; txtTelephone.Text = oCompanyDTO.Telephone; txtEmail.Text = oCompanyDTO.Email; txtDescription.InnerText = oCompanyDTO.Description; ddlType.SelectedValue = Convert.ToString((int)oCompanyDTO.Type); txtNoOfShares.Text = Convert.ToString(oCompanyDTO.NumberOfShares); txtSharePrice.Text = Convert.ToString(oCompanyDTO.SharePrice); ddlStatus.SelectedValue = Convert.ToString((int)oCompanyDTO.Status); string DecryptedPwd = Cryptography.Encryption.Decrypt(oCompanyDTO.Password, oCompanyDTO.UserName); txtUserName.Text = oCompanyDTO.UserName; txtPassword.Text = DecryptedPwd; ControllersHandler(CommandMood.View); } catch (Exception ex) { lblError.Text = ex.Message.ToString(); } }