Example #1
0
 protected void Danwei_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)                                       //判断是否是第一次加载
     {
         Danwei.DataSource    = bu.shujukudanweilianjie();; //同上
         Danwei.DataTextField = "unitname";
         Danwei.DataBind();                                 //同上
     }
 }
Example #2
0
 protected void Danwei_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (zdls.Checked || xs.Checked)
         {
             danweihoutai.Visible = false;
         }
         else
         {
             if (bu.danweimingchengpanduan(Request.QueryString["UserID"]) == "学生" || bu.danweimingchengpanduan(Request.QueryString["UserID"]) == "指导老师")
             {
                 danweihoutai.Visible = false;
             }
             else
             {
                 Danwei.DataSource    = bu.shujukudanweilianjie();
                 Danwei.DataTextField = "unitname";
                 Danwei.SelectedValue = bu.danweimingcheng(Request.QueryString["UserID"]);
                 Danwei.DataBind();//同上
             }
         }
     }
 }
Example #3
0
 protected void bxdwyh_CheckedChanged(object sender, EventArgs e)
 {
     if (yingcangzhi.Text == "1")
     {
         yingcangzhi.Text = "0";
     }
     else
     {
         Suoshusheng.SelectedIndex = 0;
         Suoshushi.SelectedIndex   = 0;
     }
     if (xs.Checked || zdls.Checked)
     {
         danweihoutai.Visible = false;
         if (xs.Checked)
         {
             mimahoutai.Visible          = false;
             querenmimahoutai.Visible    = false;
             xingbiehoutai.Visible       = false;
             youxianghoutai.Visible      = false;
             chushengriqihoutai.Visible  = false;
             lianxifangshihoutai.Visible = false;
             jiatingzhuzhihoutai.Visible = false;
             xiangxidizhihoutai.Visible  = false;
             suoshulaoshihoutai.Visible  = true;
             suoshulaoshi.DataSource     = bu.shujukulaoshilianjie();
             suoshulaoshi.DataTextField  = "username";
             suoshulaoshi.DataBind();//同上
         }
         else
         {
             mimahoutai.Visible          = true;
             querenmimahoutai.Visible    = true;
             xingbiehoutai.Visible       = true;
             youxianghoutai.Visible      = true;
             chushengriqihoutai.Visible  = true;
             lianxifangshihoutai.Visible = true;
             jiatingzhuzhihoutai.Visible = true;
             xiangxidizhihoutai.Visible  = true;
             suoshulaoshihoutai.Visible  = false;
         }
     }
     else if (bxdwyh.Checked)
     {
         mimahoutai.Visible          = true;
         querenmimahoutai.Visible    = true;
         danweihoutai.Visible        = true;
         suoshulaoshihoutai.Visible  = false;
         xingbiehoutai.Visible       = false;
         youxianghoutai.Visible      = false;
         chushengriqihoutai.Visible  = false;
         lianxifangshihoutai.Visible = false;
         jiatingzhuzhihoutai.Visible = false;
         xiangxidizhihoutai.Visible  = false;
     }
     else
     {
         if (xs.Checked)
         {
             suoshulaoshihoutai.Visible = true;
         }
         else
         {
             suoshulaoshihoutai.Visible = false;
         }
         mimahoutai.Visible          = true;
         querenmimahoutai.Visible    = true;
         xingbiehoutai.Visible       = true;
         youxianghoutai.Visible      = true;
         chushengriqihoutai.Visible  = true;
         lianxifangshihoutai.Visible = true;
         jiatingzhuzhihoutai.Visible = true;
         xiangxidizhihoutai.Visible  = true;
         danweihoutai.Visible        = true;
         Danwei.DataSource           = bu.shujukudanweilianjie();
         Danwei.DataTextField        = "unitname";
         Danwei.DataBind();//同上
     }
 }