예제 #1
0
        private void hospdepForm_Load(object sender, EventArgs e)
        {
            IList <aers_tbl_hospital> listhospital = dalhospital.hospitalFindAll();


            this.txt_HospId.FieldValue   = "HospName";
            this.txt_HospId.DisplayValue = "HospName";
            this.txt_HospId.DataSource   = listhospital;
        }
예제 #2
0
        private IList <aers_tbl_hospital> GetHospital()
        {
            aers_tbl_events_ycSqlMapDao atdao    = new aers_tbl_events_ycSqlMapDao(); //这命名。。。
            IList <aers_tbl_hospital>   codelist = atdao.hospitalFindAll();

            return(codelist);
        }
예제 #3
0
        public void DataBind()
        {
            IList <aers_tbl_hospdep> list = dal.hospdepFindAll();

            IList <aers_tbl_hospital> listhospital = dalhospital.hospitalFindAll();


            foreach (aers_tbl_hospdep item in list)
            {
                aers_tbl_hospital hospital = listhospital.FirstOrDefault(o => o.HospId == item.HospId);
                if (hospital != null)
                {
                    item.HospName = hospital.HospName;
                }
            }


            string Pram = txtfind.Text.Trim();

            if (!string.IsNullOrEmpty(Pram))
            {
                list = list.Where(o => o.HospName.Contains(Pram) || o.HospdepName.Contains(Pram)).ToList();
            }

            this.gridControl1.DataSource = new BindingList <aers_tbl_hospdep>(list);;
            lblcount.Text = "共 " + list.Count + " 条";
        }
예제 #4
0
        private void OperatorForm_Load(object sender, EventArgs e)
        {
            IList <aers_tbl_hospital> listhospital = dalhospital.hospitalFindAll();


            this.txt_HospId.Properties.DisplayMember = "HospName";
            this.txt_HospId.Properties.ValueMember   = "HospId";
            this.txt_HospId.Properties.DataSource    = listhospital;



            IList <aers_tbl_hospdep> listhospdep = dalhospdep.hospdepFindAll();


            this.txt_HospdepId.FieldValue   = "HospdepName";
            this.txt_HospdepId.DisplayValue = "HospdepName";
            this.txt_HospdepId.DataSource   = listhospdep;
        }
예제 #5
0
        public void DataBind()
        {
            IList <aers_tbl_hospital> list = dal.hospitalFindAll();

            string Pram = txtfind.Text.Trim();

            if (!string.IsNullOrEmpty(Pram))
            {
                list = list.Where(o => o.HospName.Contains(Pram)).ToList();
            }

            this.gridControl1.DataSource = new BindingList <aers_tbl_hospital>(list);;
            lblcount.Text = "共 " + list.Count + " 条";
        }
예제 #6
0
        public void DataBind(aers_tbl_registereduser data = null)
        {
            if (data == null)
            {
                registereduser = new aers_tbl_registereduser();

                state = FormState.Add;
            }
            else
            {
                registereduser = data;
                state          = FormState.Modify;

                txt_LoginName.Text = data.LoginName;
                txt_Remarks.Text   = data.Remarks;



                staff = dalstaff.FindByRUid(data.ReguserId);

                if (staff != null)
                {
                    aers_tbl_hospdep hospdep = dalhospdep.FindhospdepByDepId(staff.DepId);

                    if (hospdep != null)
                    {
                        aers_tbl_hospital listhosp = dalhospital.hospitalFindAll().FirstOrDefault(o => o.HospId == hospdep.HospId);

                        txt_HospId.EditValue = listhosp.HospId;

                        this.txt_HospdepId.Text = hospdep.HospdepName;
                        this.txt_HospdepId.Tag  = hospdep.HospdepId;
                    }


                    txt_Name.Tag  = staff.StaffId;
                    txt_Name.Text = staff.Name;

                    txt_RoleState.Text    = staff.RoleState.ToString();
                    txt_Sex.SelectedValue = staff.Sex;
                    txt_Phone.Text        = staff.Phone;
                    txt_StaffRemarks.Text = staff.Remarks;
                }
            }
        }
예제 #7
0
        protected void btn2_Click(object sender, EventArgs e)
        {
            aers_tbl_events_ycSqlMapDao dal      = new aers_tbl_events_ycSqlMapDao();
            IList <aers_tbl_hospital>   listhosp = dal.hospitalFindAll();



            aers_tbl_eventsresumeSqlMapDao dao  = new aers_tbl_eventsresumeSqlMapDao();
            IList <aers_tbl_eventsresume>  list = dao.GetEventsresumeList().OrderByDescending(o => o.EveresId).ToList();


            foreach (aers_tbl_eventsresume item in list)
            {
                aers_tbl_hospital hosp = listhosp.FirstOrDefault(o => o.HospId == item.HospId);
                if (hosp != null)
                {
                    item.HospId = hosp.HospName;
                }
            }

            GridView1.DataSource = list;
            GridView1.DataBind();
        }