/// <summary>
    /// 初始加载
    /// </summary>
    private void OnStart(object sender, EventArgs e)
    {
        Owen.Model.Model_Hospital model = new Owen.BLL.BLL_Hospital().GetEntity(hospitalId);

        if (model == null) return;

        ddlHosType.SelectedValue = model.HosType.ToString();
        txtName.Text = model.Name;
        txtPhone.Text = model.Phone;
        txtAddress.Text = model.Address;

        //医院Id
        int hosId = model.HospitalID;

        //根据医院Id得到所属的城市Id
        Owen.Model.Model_Hospital mHospital = new Owen.BLL.BLL_Hospital().GetEntity(hosId);
        if (mHospital == null) return;
        int cityId = mHospital.CityID;

        //根据城市Id得到省(直辖市)Id
        Owen.Model.Model_City mCity = new Owen.BLL.BLL_City().GetEntity(cityId);
        if (mCity == null) return;
        int province = mCity.ProvinceID;

        ddlProvince.SelectedValue = province.ToString();
        ddlProvince_SelectedIndexChanged(sender, e);

        txtContent.Value = model.Memo;
        ddlCity.SelectedValue = cityId.ToString();
    }
    /// <summary>
    /// 初始加载
    /// </summary>
    private void OnStart(object sender, EventArgs e)
    {
        Owen.Model.Model_Distributor model = new Owen.BLL.BLL_Distributor().GetEntity(distributorId);

        if (model == null) return;

        txtContact.Text = model.Contact;
        txtName.Text = model.DistributorName;
        txtMobile.Text = model.Mobile;
        txtAddress.Text = model.Address;
        txtContent.Value = model.Memo;



        //医院Id
        int hosId = model.DistributorID;

        //根据医院Id得到所属的城市Id
        Owen.Model.Model_Distributor mDistributor = new Owen.BLL.BLL_Distributor().GetEntity(hosId);
        if (mDistributor == null) return;
        int cityId = mDistributor.CityID;

        //根据城市Id得到省(直辖市)Id
        Owen.Model.Model_City mCity = new Owen.BLL.BLL_City().GetEntity(cityId);
        if (mCity == null) return;
        int province = mCity.ProvinceID;

        ddlProvince.SelectedValue = province.ToString();
        ddlProvince_SelectedIndexChanged(sender, e);

        
        ddlCity.SelectedValue = cityId.ToString();
        ddlCity_SelectedIndexChanged(select, e);

        IList<Owen.Model.Model_DistributorRelation> distributorLists =
                new Owen.BLL.BLL_DistributorRelation().GetEntities(string.Format(" DistributorID = {0} ", hosId));

        foreach (var v in distributorLists)
        {
            //选择
            foreach (ListItem li in this.cblHos.Items)
            {
                if (v.HospitalID.ToString().Equals(li.Value))
                {
                    li.Selected = true;
                }
            }
        }
    }
 /// <summary>
 /// 绑定城市
 /// </summary>
 private void BindCity(int provinceId)
 {
     IList<Owen.Model.Model_City> list = new Owen.BLL.BLL_City().GetEntities(string.Format(" ProvinceID = {0}", provinceId));
     ddlCity.DataTextField = "Name";
     ddlCity.DataValueField = "CityID";
     ddlCity.DataSource = list;
     ddlCity.DataBind();
     ddlCity.Items.Insert(0, new ListItem("--请选择城市--", ""));
 }
    /// <summary>
    /// 初始加载
    /// </summary>
    private void OnStart(object sender, EventArgs e)
    {
        Owen.Model.Model_Doctor model = new Owen.BLL.BLL_Doctor().GetEntity(doctorId);

        if (model == null) return;

        ddlDepartment.SelectedValue = model.DepartmentID.ToString();
        txtName.Text = model.Name;
        txtMobile.Text = model.Mobile;
        txtNativePlace.Text = model.NativePlace;
        txtJobTitle.Text = model.JobTitle;
        ddlSex.SelectedValue = model.Sex.ToString();
        ddlStatus.SelectedValue = model.Status.ToString();
        //医院Id
        int hosId = model.HospitalID;

        //根据医院Id得到所属的城市Id
        Owen.Model.Model_Hospital mHospital = new Owen.BLL.BLL_Hospital().GetEntity(hosId);
        if(mHospital == null ) return;
        int cityId = mHospital.CityID;

        //根据城市Id得到省(直辖市)Id
        Owen.Model.Model_City mCity = new Owen.BLL.BLL_City().GetEntity(cityId);
        if (mCity == null) return;
        int province = mCity.ProvinceID;

        ddlProvince.SelectedValue = province.ToString();
        ddlProvince_SelectedIndexChanged(sender, e);

        ddlCity.SelectedValue = cityId.ToString();
        ddlCity_SelectedIndexChanged(sender, e);

        ddlHospital.SelectedValue = hosId.ToString();
    }
    /// <summary>
    /// 初始加载
    /// </summary>
    private void OnStart(object sender, EventArgs e)
    {
        Owen.Model.Model_Medical model = new Owen.BLL.BLL_Medical().GetEntity(medicalId);

        if (model == null) return;

        txtPatientMobile.Text = model.PatientMobile;
        txtPatientBirth.Text = model.PatientBirth;
        txtPatientAge.Text = model.PatientAge.ToString();
        ddlPatientSex.SelectedValue = model.PatientSex.ToString();
        txtPatientName.Text = model.PatientName;
        txtSurgery.Text = model.Surgery;
        txtHospitalNumber.Text = model.HospitalNumber;
        txtPatientMobile.Text = model.PatientMobile;

        //医生Id
        int doctorId = model.DoctorID;
        //根据医生Id得到所属的医院
        if (model.mDoctor == null) return;
        int hosId = model.mDoctor.HospitalID;


        //根据医院Id得到所属的城市Id
        Owen.Model.Model_Hospital mHospital = new Owen.BLL.BLL_Hospital().GetEntity(hosId);
        if (mHospital == null) return;
        int cityId = mHospital.CityID;

        //根据城市Id得到省(直辖市)Id
        Owen.Model.Model_City mCity = new Owen.BLL.BLL_City().GetEntity(cityId);
        if (mCity == null) return;
        int province = mCity.ProvinceID;


        ddlHospital.SelectedValue = hosId.ToString();
        ddlHospital_SelectedIndexChanged(sender, e);

        ddlDoctor.SelectedValue = doctorId.ToString();
    }