Exemplo n.º 1
0
 /// <summary>
 /// 页面加载
 /// </summary>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         SiteUser user = (SiteUser)Session["sa"];
         if (user != null)
         {
             List <Hospital> allHospital = SiteManagement.GetHospitals(user.ID);
             foreach (var item in allHospital)
             {
                 ListItem listItem = new ListItem(item.HospitalName, item.ID.ToString());
                 this.SelectHosptial.Items.Add(listItem);
             }
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 页面加载
 /// </summary>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         if (this.Request.QueryString["action"] != null)
         {
             string DelItem;
             int    resultID = 0;
             DelItem = this.Request.QueryString["ID"];
             if (!string.IsNullOrEmpty(DelItem))
             {
                 bool isSucess = int.TryParse(DelItem, out resultID);
             }
             DeleteBLO deleteBLO = new DeleteBLO();
             if (deleteBLO.DeleteHospitalByHospitalID(resultID))
             {
                 this.Response.Redirect("AdminManageHospital.aspx");
             }
             else
             {
                 this.Response.Write(BaseSystem.ShowWindow("出现异常,对不起,删除医院操作失败!!"));
             }
         }
         else
         {
             AdminPagePageID = Convert.ToInt32(Request.QueryString["PageID"]);
             if (Request.QueryString["PageID"] == null)
             {
                 AdminPagePageID = 1;
                 PageStartIndex  = 0;
             }
             PageStartIndex = Convert.ToInt32(AdminPagePageID - 1);
             MaxAdminPages  = GetMaxHospitalPages();
             SiteUser user = (SiteUser)Session["sa"];
             if (user != null)
             {
                 List <Hospital> hosList = SiteManagement.GetHospitals(user.ID);
                 BaseSystem.BindProduceData <Hospital>(this.DataListHospital, hosList, PageStartIndex, PageStartIndex, PageSize);
                 ShowBottomUrl();
             }
             ShowBottomUrl();
         }
     }
 }