コード例 #1
0
        protected void ListFacilities_SelectedIndexChanged(object sender, EventArgs e)
        {
            ServiceInterfaceManager.LogInformation("POSTBACK_EVENT", String.Format("{0}.{1}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName, System.Reflection.MethodBase.GetCurrentMethod().Name), HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId);

            try
            {
                int id = 0;
                int.TryParse(listFacilities.SelectedValue, out id);

                if (id > 0)
                {
                    STD_INSTITUTION fac = ServiceInterfaceManager.STD_INSTITUTION_GET_COMPLETE(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, id);
                    if (fac != null)
                    {
                        lblFacilityName.Text = fac.NAME;
                        lblFacilityCode.Text = fac.STATIONNUMBER;
                        lblVistaName.Text    = fac.VISTANAME;
                        lblVisn.Text         = fac.VISN.NAME;
                        lblAddress.Text      = GenerateAddressBlock(fac);
                        lblFacilityType.Text = fac.STD_FACILITYTYPE.NAME;

                        pnlFacility.Visible = true;
                    }
                    else
                    {
                        pnlFacility.Visible = false;
                    }
                }
                else
                {
                    pnlFacility.Visible = false;
                }
            }
            catch (Exception ex)
            {
                ServiceInterfaceManager.LogError(ex.Message, String.Format("{0}.{1}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName, System.Reflection.MethodBase.GetCurrentMethod().Name), HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId);
                throw ex;
            }
        }