private void btnSearch_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtCorpRegiNo.Text) == false) { SellerVO sellerWithCorp = new SellerVO(); SellerVO sellerWithID = new SellerVO(); sellerWithCorp.Corporate_registration_no = txtCorpRegiNo.Text; try { sellerWithID = sDao.SearchSellerID(sellerWithCorp); } catch (Exception) { MessageBox.Show("해당하는 ID가 없습니다."); } if (string.IsNullOrEmpty(sellerWithID.Seller_ID) == false) { txtID.Visible = true; txtID.Text = sellerWithID.Seller_ID; } else { //MessageBox.Show("해당하는 ID가 없습니다."); } } }
public SellerVO SearchSellerID(SellerVO seller) { List <object> lstObj = new List <object>(); string query = "SearchSellerID"; SqlParameter[] sqlp = { new SqlParameter("corpRegiNo", seller.Corporate_registration_no) }; lstObj = con.SendReadQuery(query, sqlp); try { seller = (SellerVO)lstObj[0]; return(seller); } catch (Exception) { throw; } }