/// <summary>
 /// gridview绑定
 /// </summary>
 private void LoadCompany()
 {
     vb = OADept.GetCompany(this.ddlType.SelectedIndex + 1, this.txtSearchText.Text.Trim());
     if (vb != null)
     {
         this.gvCompany.DataSource = vb.DtTable;
         this.gvCompany.DataBind();
     }
 }
Пример #2
0
 /// <summary>
 /// 列表数据绑定
 /// </summary>
 private void LoadCompany()
 {
     vb = OADept.GetCompany(1, null);
     if (vb != null)
     {
         this.msExoticCompanyList.DataSource = vb.DtTable;
         this.msExoticCompanyList.DataBind();
     }
 }
        /// <summary>
        /// 脚本回传
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnOK_Click(object sender, EventArgs e)
        {
            String strIds   = String.Empty;
            String strNos   = String.Empty;
            String strNames = String.Empty;

            if (UCIsSingle)
            {
                strIds = this.gvCompany.SelectedKey;
            }
            else
            {
                strIds = SysString.GetStringFormatForList(this.gvCompany.SelectedKeys, ",");
            }
            vb = OADept.GetCompany(this.ddlType.SelectedIndex + 1, this.txtSearchText.Text.Trim());
            if (String.IsNullOrEmpty(strIds) == false)
            {
                if (vb != null)
                {
                    vb.Condition = "a.ID in (" + strIds + ")";
                    strIds       = vb.GetFieldVals("ID", ";");
                    strNos       = vb.GetFieldVals("No", ";");
                    strNames     = vb.GetFieldVals("Name", ";") + ";";
                }
            }

            String strScript = String.Empty;

            if (this.UCIDControl != String.Empty)
            {
                strScript += base.GetJSscriptValue(this.UCIDControl, strIds);
            }

            if (this.UCNoControl != String.Empty)
            {
                strScript += base.GetJSscriptValue(this.UCNoControl, strNos);
                strScript += base.GetJSscriptTitle(this.UCNoControl, strNames);
            }

            if (this.UCNameControl != String.Empty)
            {
                strScript += base.GetJSscriptValue(this.UCNameControl, strNames);
                strScript += base.GetJSscriptTitle(this.UCNameControl, strNos);
            }
            if (UCIsSingle)
            {
                strScript += String.Format("parent.ClosePopDiv('{0}')", base.divPopDivID + base.UCID);
            }
            //组成一整条js后运行
            ClientScriptM.ResponseScript(this, strScript);
        }