愛麗絲的心情
關於部落格
點點滴滴皆是記錄
步步痕跡皆是煩惱
  • 59452

    累積人氣

  • 15

    今日人氣

    0

    訂閱人氣

DataSet+DropdownList+CodeSmith

txtCustComId = (TextBox)FormView1.FindControl("dataCustComId"); ddlCustContactId = (DropDownList)FormView1.FindControl("dataCustContactId"); if (txtCustComId.Text != "") { Session["custComName"] = txtCustComId.Text; ERPClass.Services.CustCompanyService comServices = new CustCompanyService(); TList comList = ERPClass.Data.DataRepository.CustCompanyProvider.Find("CustComName='" + Session["custComName"].ToString() + "'"); DataSet dsCom = new DataSet(); dsCom = comList.ToDataSet(false); Int32 comId = Convert.ToInt32(dsCom.Tables[0].Rows[0]["custComId"].ToString()); ERPClass.Services.CustContactService ContactService = new CustContactService(); TList contactList = ERPClass.Data.DataRepository.CustContactProvider.GetByCustComId(comId); DataSet dsContact = new DataSet(); dsContact = contactList.ToDataSet(false); if (dsContact.Tables[0].Rows.Count > 0) { ddlCustContactId.DataSource = dsContact; ddlCustContactId.DataTextField = "custContactName"; ddlCustContactId.DataValueField = "custContactId"; ddlCustContactId.DataBind(); } }
相簿設定
標籤設定
相簿狀態