예제 #1
0
        private void bindListDepartment()
        {
            try
            {
                cls_DepartmentInformation dInfor = new cls_DepartmentInformation();
                dInfor.CompanyId = Convert.ToInt16(ddlCompany.SelectedValue);

                DataTable dtDInfo = dInfor.SelectDTS();
                StringBuilder sb = new StringBuilder();

                for (int i = 0; i < dtDInfo.Rows.Count; i++)
                {
                    sb.Append("<tr>"+
                              "  <td nowrap=\"nowrap\" align=\"center\">"+
                              "          "+(i+1).ToString()+
                              "      </td><td nowrap=\"nowrap\" align=\"Left\">" + dtDInfo.Rows[i]["ExtendStr"].ToString() +
                              "          <a class=\"NormalBold\" href=\"Department.aspx?D_Id=" + dtDInfo.Rows[i]["Id"].ToString() + "&D_Action=1\">" +
                              "              <acronym title=''>" + dtDInfo.Rows[i]["DepartNameNature"].ToString() +
                              "              </acronym>"+
                              "          </a>"+
                              "      </td><td valign=\"Top\">" + dtDInfo.Rows[i]["Established_Number"].ToString() +
                              "      </td><td align=\"Center\" valign=\"Top\">" + dtDInfo.Rows[i]["Established_Date"].ToString() +
                              "      </td><td valign=\"Top\">" + dtDInfo.Rows[i]["Established_Signer"].ToString() +
                              "      </td><td valign=\"Top\">" + dtDInfo.Rows[i]["LeaderMember"].ToString() +
                              "      </td>"+
                            "</tr>");
                }

                ltl_ListDepartment.Text = sb.ToString();
            }
            catch (Exception ex)
            {
            }
        }