Beispiel #1
0
    /// <summary>
    /// 列表显示
    /// </summary>
    public void Bind()
    {
        //查询
        int    pageCount = 0;
        int    Counts    = 0;
        string strwhere  = string.Empty;

        string txtHospitalName = Common.NoHTML(this.txtHospitalName.Value.Trim().Replace("'", ""));

        if (txtHospitalName != "")
        {
            strwhere += " and  HospitalName like '%" + txtHospitalName + "%' ";
        }
        strwhere += " and isnull(dr,0)=0"; //IsDel=1  订单已删除
        if (this.txtPager.Value.Trim().ToString() != "")
        {
            if (this.txtPager.Value.Trim().Length >= 5)
            {
                Pager.PageSize      = 100;
                this.txtPager.Value = "100";
            }
            else
            {
                Pager.PageSize = this.txtPager.Value.Trim().ToInt(0);
            }
        }

        List <Hi.Model.SYS_Hospital> hospital = new Hi.BLL.SYS_Hospital().GetList(Pager.PageSize, Pager.CurrentPageIndex, "CreateDate", true, strwhere, out pageCount, out Counts);

        this.rptPAcount.DataSource = hospital;
        this.rptPAcount.DataBind();

        Pager.RecordCount = Counts;
        page = Pager.CurrentPageIndex.ToString();
    }
Beispiel #2
0
 protected void Bind()
 {
     hid = Request.QueryString["hid"] + "";
     if (!string.IsNullOrWhiteSpace(hid))
     {
         Hi.Model.SYS_Hospital hospital = new Hi.BLL.SYS_Hospital().GetModel(Convert.ToInt32(hid));
         if (hospital != null)
         {
             this.hospitalCode.InnerText  = hospital.HospitalCode;  //医院编码
             this.hospitalName.InnerText  = hospital.HospitalName;  //医院全称
             this.hospitalLevel.InnerText = hospital.HospitalLevel; //医院级别
             this.hidProvince.InnerText   = hospital.Province;      //省
             this.hidCity.InnerText       = hospital.City;          //市
             this.hidArea.InnerText       = hospital.Area;          //区
             this.address.InnerText       = hospital.Address;       //详细地址
             if (hospital.IsEnabled)
             {
                 this.IsEnabled.InnerHtml = "<span><img src='../../Company/images/t06.png'/></span>停用";
                 isEnabledText            = false;
             }
             else
             {
                 this.IsEnabled.InnerHtml = "<span><img src='../../Company/images/t06.png '/></span>启用";
                 isEnabledText            = true;
             }
         }
     }
 }
Beispiel #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         List <Hi.Model.SYS_Hospital> HtList = new Hi.BLL.SYS_Hospital().GetList("", " dr=0", "");
         HtDrop.DataSource     = HtList;
         HtDrop.DataTextField  = "HospitalName";
         HtDrop.DataValueField = "ID";
         HtDrop.DataBind();
         this.txtHtDropID.Value = this.HtDrop.SelectedValue;
         this.txtHtDrop.Value   = this.HtDrop.SelectedItem.Text;
         if (!string.IsNullOrEmpty(Request["TrId"]))
         {
             this.hidTrId.Value = Request["TrId"].ToString();
         }
         if (!string.IsNullOrEmpty(Request["indexs"]))
         {
             this.hidIndex.Value = Request["indexs"].ToString();
         }
         if (!string.IsNullOrEmpty(Request["htId"]))
         {
             this.HtDrop.SelectedValue = Request["htId"].ToString();
         }
     }
 }
Beispiel #4
0
    /// <summary>
    /// 新增修改方法
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        string hid = Request["hid"] + "";

        if (!string.IsNullOrWhiteSpace(hid))
        {
            Hi.Model.SYS_Hospital hospital = new Hi.BLL.SYS_Hospital().GetModel(Convert.ToInt32(hid));
            hospital.HospitalCode  = this.hospitalCode.Value.Trim();  //医院编码
            hospital.HospitalName  = this.hospitalName.Value.Trim();  //医院全称
            hospital.HospitalLevel = this.hospitalLevel.Value.Trim(); //医院级别
            hospital.Province      = this.hidProvince.Value.Trim();   //省
            hospital.City          = this.hidCity.Value.Trim();       //市
            hospital.Area          = this.hidArea.Value.Trim();       //区
            hospital.Address       = this.address.Value.Trim();       //详细地址
            if (new Hi.BLL.SYS_Hospital().Update(hospital))
            {
                Response.Redirect("hospitalInfo.aspx?hid=" + hospital.ID);
            }
            else
            {
                JScript.AlertMsgMo(this, "医院编辑失败", "function (){ window.location.reload(); }");
            }
        }
        else
        {
            List <Hi.Model.SYS_Hospital> hoslist = new Hi.BLL.SYS_Hospital().GetList("", " HospitalName='" + this.hospitalName.Value.Trim() + "'", "");

            if (hoslist != null && hoslist.Count > 0)
            {
                JScript.AlertMsgMo(this, "医院名称已存在", "function (){  }");
            }
            else
            {
                Hi.Model.SYS_Hospital hospital = new Hi.Model.SYS_Hospital();
                hospital.HospitalCode  = this.hospitalCode.Value.Trim();  //医院编码
                hospital.HospitalName  = this.hospitalName.Value.Trim();  //医院全称
                hospital.HospitalLevel = this.hospitalLevel.Value.Trim(); //医院级别
                hospital.Province      = this.hidProvince.Value.Trim();   //省
                hospital.City          = this.hidCity.Value.Trim();       //市
                hospital.Area          = this.hidArea.Value.Trim();       //区
                hospital.Address       = this.address.Value.Trim();       //详细地址
                hospital.CreateDate    = DateTime.Now;
                hospital.dr            = false;
                hospital.CreateUser    = UserID.ToString();
                hospital.IsEnabled     = true;
                hospital.ts            = DateTime.Now;
                int id = new Hi.BLL.SYS_Hospital().Add(hospital);
                if (id > 0)
                {
                    Response.Redirect("hospitalInfo.aspx?hid=" + id);
                }
                else
                {
                    JScript.AlertMsgMo(this, "医院编辑失败", "function (){ window.location.reload(); }");
                }
            }
        }
    }
Beispiel #5
0
 public string getHtName(string htid)
 {
     Hi.Model.SYS_Hospital hospital = new Hi.BLL.SYS_Hospital().GetModel(Convert.ToInt32(htid));
     if (hospital != null)
     {
         return(hospital.HospitalName);
     }
     else
     {
         return("选择医院");
     }
 }
Beispiel #6
0
 public string getHname(string id)
 {
     Hi.Model.SYS_Hospital h = new Hi.BLL.SYS_Hospital().GetModel(Convert.ToInt32(id));
     if (h == null)
     {
         return(id);
     }
     else
     {
         return(h.HospitalName);
     }
 }
Beispiel #7
0
    /// <summary>
    /// 绑定销售订单信息列表
    /// </summary>
    public void Bind()
    {
        int    pageCount = 0;
        int    Counts    = 0;
        string strwhere  = Where();
        List <Hi.Model.SYS_Hospital> hospital = new Hi.BLL.SYS_Hospital().GetList(Pager.PageSize, Pager.CurrentPageIndex, "CreateDate", true, strwhere, out pageCount, out Counts);

        this.rptOrder.DataSource = hospital;
        this.rptOrder.DataBind();

        Pager.RecordCount = Counts;
        page = Pager.CurrentPageIndex.ToString();
    }
Beispiel #8
0
 /// <summary>
 /// 启用或停用方法
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void IsEnabledbtn_Click(object sender, EventArgs e)
 {
     hid = Request.QueryString["hid"] + "";
     Hi.Model.SYS_Hospital hospital = new Hi.BLL.SYS_Hospital().GetModel(Convert.ToInt32(hid));
     hospital.IsEnabled = hospital.IsEnabled?false :true;
     if (new Hi.BLL.SYS_Hospital().Update(hospital))
     {
         JScript.AlertMsg(this, "" + this.IsEnabled.InnerText + "成功", "");
         Response.Redirect("hospitalInfo.aspx?hid=" + hospital.ID);
     }
     else
     {
         JScript.AlertMsg(this, "操作失败", "function (){ window.location.reload(); }");
     }
 }
Beispiel #9
0
    protected void Bind()
    {
        string hid = Request["hid"] + "";

        if (!string.IsNullOrWhiteSpace(hid))
        {
            Hi.Model.SYS_Hospital hospital = new Hi.BLL.SYS_Hospital().GetModel(Convert.ToInt32(hid));
            if (hospital != null)
            {
                this.hospitalCode.Value  = hospital.HospitalCode;  //医院编码
                this.hospitalName.Value  = hospital.HospitalName;  //医院全称
                this.hospitalLevel.Value = hospital.HospitalLevel; //医院级别
                this.hidProvince.Value   = hospital.Province;      //省
                this.hidCity.Value       = hospital.City;          //市
                this.hidArea.Value       = hospital.Area;          //区
                this.address.Value       = hospital.Address;       //详细地址
            }
        }
    }
Beispiel #10
0
    private string GetHt()
    {
        string wherestr = @" dr=0 and ID in (select ht.ID from SYS_Hospital ht where ht.ID not in (select distinct 
HtID from YZT_FirstCamp fc where isnull(fc.dr,0)=0 and fc.State not in (0,1) and fc.CMID=" + this.KeyID + "))";

        if (Request["Province"] + "" != "" && Request["Province"] + "" != "选择省")
        {
            wherestr += "and Province ='" + Request["Province"] + "'";
        }
        if (Request["City"] + "" != "")
        {
            wherestr += "and City ='" + Request["City"] + "'";
        }
        if (Request["Area"] + "" != "")
        {
            wherestr += "and Area ='" + Request["Area"] + "'";
        }

        List <Hi.Model.SYS_Hospital> htlist = new Hi.BLL.SYS_Hospital().GetList("", wherestr, "");


        return(new JavaScriptSerializer().Serialize(htlist));
    }