protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //设置只读权限
         if (Request.QueryString["type"] == "read")
         {
             btn_submit.Visible = false;
             ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "$(function(){$('input').attr('readonly', 'readonly');$('select').attr('disabled', 'true');$('textarea').attr('readonly', 'readonly');});", true);
         }
         //设置外看只读权限
         if (Request.QueryString["limt"] == "read2")
         {
             this.Acount.Visible      = false;
             this.AcountMoney.Visible = false;
             btn_submit.Visible       = false;
             ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "$(function(){$('input').attr('readonly', 'readonly');$('select').attr('disabled', 'true');$('textarea').attr('readonly', 'readonly');});", true);
         }
         //绑定项目
         ProjectName.DataSource     = WebBLL.Tbl_ProjectManager.GetTbl_ProjectAll();
         ProjectName.DataTextField  = "ProjectName";
         ProjectName.DataValueField = "ID";
         ProjectName.DataBind();
         //单位
         PO_CompanyID.DataSource     = WebBLL.Tbl_ProjectOuterCompanyManager.GetTbl_ProjectOuterCompanyAll();
         PO_CompanyID.DataTextField  = "POC_Name";
         PO_CompanyID.DataValueField = "ID";
         PO_CompanyID.DataBind();
         Bind();
     }
 }
Пример #2
0
 protected void POC_Type2_SelectedIndexChanged(object sender, EventArgs e)
 {
     PO_CompanyID.DataSource     = WebBLL.Tbl_ProjectOuterCompanyManager.GetDataTableByPage(100, 1, "poc_type2='" + this.POC_Type2.SelectedItem.Text + "'", "");
     PO_CompanyID.DataTextField  = "POC_Name";
     PO_CompanyID.DataValueField = "ID";
     PO_CompanyID.DataBind();
     PO_CompanyID.Items.Insert(0, new ListItem("选择单位", ""));
 }