Exemplo n.º 1
0
        private void LoadBucterList()
        {
            List <double> outValue = new List <double>();//输出统计数
            DataSet       ds       = new DataSet();

            //PatientObject po = new PatientObject();
            Maticsoft.BLL.Patient bll = new Maticsoft.BLL.Patient();

            int startIndex = (pagination1.CurrentPage - 1) * pagination1.PageSize;
            int endIndex   = pagination1.PageSize * pagination1.CurrentPage - 1;

            ds = bll.GetListByPage("", "", startIndex, endIndex);
            ugGrid.DataSource = ds;
            ugGrid.DataBind();

            pagination1.RecordCount = bll.GetRecordCount("");
            //if (outValue != null && outValue.Count != 0)
            //{
            //    pagination1.RecordCount = Convert.ToInt32(outValue[0]);//记录数
            //    this.pagination1.StaticInfo = ugGrid.DisplayLayout.Bands[0].Columns["ANIMALAMOUNT"].Header.Caption + outValue[1].ToString() //检疫数
            //                                  + " " + ugGrid.DisplayLayout.Bands[0].Columns["AMOUNT"].Header.Caption + outValue[2].ToString() //进场数
            //                                  + " " + ugGrid.DisplayLayout.Bands[0].Columns["BUTCHERNUM"].Header.Caption + outValue[3].ToString() //屠宰数
            //                                  + " " + ugGrid.DisplayLayout.Bands[0].Columns["PRODUCTNUM"].Header.Caption + outValue[4].ToString(); //出厂数
            //}
            //else
            //{
            //    pagination1.RecordCount = 0;
            //}
        }
Exemplo n.º 2
0
        private void BindTraceList()
        {
            Maticsoft.BLL.Patient bll = new Maticsoft.BLL.Patient();
            DataSet dt = bll.GetTracedPatient();

            this.ugBadAction_w.DataSource = dt;
            this.ugBadAction_w.DataBind();
        }
Exemplo n.º 3
0
        private void BindPatientDetail()
        {
            Maticsoft.BLL.Patient   bll = new Maticsoft.BLL.Patient();
            Maticsoft.Model.Patient p   = bll.GetModel(int.Parse(PatientID));

            if (p != null)
            {
                this.txtIDNo.Text = p.IDCode;
                this.txtName.Text = p.Name;
            }
        }
Exemplo n.º 4
0
        //export data to excel
        private void btnOK_Click(object sender, EventArgs e)
        {
            Maticsoft.BLL.Patient patientBLL = new Maticsoft.BLL.Patient();
            DataSet ds = patientBLL.GetAllListWithTitle();

            ds.Tables[0].TableName = "患者信息";

            //人口学数据
            Maticsoft.BLL.Demographic demoBLL = new Maticsoft.BLL.Demographic();
            DataTable dtDemo = demoBLL.GetAllListWithTitle().Tables[0].Copy();

            dtDemo.TableName = "人口学数据";
            //一般情况
            Maticsoft.BLL.GeneralInfo geneBLL = new Maticsoft.BLL.GeneralInfo();
            DataTable dtGene = geneBLL.GetAllListWithTitle().Tables[0].Copy();

            dtGene.TableName = "一般情况";

            ds.Tables.Add(dtDemo);
            ds.Tables.Add(dtGene);
            DialogResult result = this.folderBrowserDialog1.ShowDialog();

            if (result == DialogResult.OK)
            {
                string foldername = this.folderBrowserDialog1.SelectedPath;
                try
                {
                    if (cbTreatInfo.Checked || cbTreatInfoBadAction.Checked)
                    {
                        DataSet dsTreatInfo = GetTreatInfo();
                        CreateExcelFile.CreateExcelDocument(dsTreatInfo, foldername + @"\治疗情况.xlsx");
                    }
                    if (cbCOPD.Checked || cbBlood.Checked || cbLung.Checked || cbDicom.Checked || cbChartis.Checked || cbSport.Checked)
                    {
                        DataSet dsBeforeTreatInfo = GetBeforeTreatInfo();
                        CreateExcelFile.CreateExcelDocument(dsBeforeTreatInfo, foldername + @"\治疗前基线指标.xlsx");
                    }

                    CreateExcelFile.CreateExcelDocument(ds, foldername + @"\患者基本信息.xlsx");
                    MessageBox.Show("数据提取成功!");
                    if (File.Exists(foldername))
                    {
                        Process.Start("explorer.exe", foldername);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Couldn't create Excel file.\r\nException: " + ex.Message);
                    return;
                }
                // the code here will be executed if the user presses Open in
                // the dialog.
            }
        }
Exemplo n.º 5
0
        private void ShowPops()
        {
            Maticsoft.BLL.Patient bll = new Maticsoft.BLL.Patient();
            DataSet ds = bll.GetTracedPatient();

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    ShowPatientPop(dr["ID"].ToString(), dr["Name"].ToString(), dr["Period"].ToString(), dr["PeriodName"].ToString());
                }
            }
        }
Exemplo n.º 6
0
        private bool SavePatientInfo()
        {
            Maticsoft.BLL.Patient bll = new Maticsoft.BLL.Patient();
            bool ret = true; //标记位

            if (OperatType == 0)
            {
                Patient patientInfo = new Patient();
                patientInfo.IDCode     = this.txtIDNo.Text;
                patientInfo.Name       = this.txtName.Text;
                patientInfo.SignDate   = DateTime.Now;
                patientInfo.ModifyDate = DateTime.Now;
                ret = bll.Add(patientInfo);// PatientObject.AddPatientInfo(patientInfo);//新增屠宰信息
            }
            else if (OperatType == 1)
            {
                Patient patientInfo = bll.GetModel(int.Parse(PatientID));
                patientInfo.IDCode     = this.txtIDNo.Text;
                patientInfo.Name       = this.txtName.Text;
                patientInfo.ModifyDate = DateTime.Now;
                ret = bll.Update(patientInfo);// PatientObject.EditPatientInfo(patientInfo);//编辑屠宰信息
            }
            return(ret);
        }
Exemplo n.º 7
0
        public AfterTreatTrace(int patientID, int treatPeriod)
        {
            InitializeComponent();
            pid    = patientID;
            period = treatPeriod;
            Maticsoft.BLL.Patient patientBLL = new Maticsoft.BLL.Patient();
            Patient p = patientBLL.GetModel(pid);

            if (p != null)
            {
                patientName = p.Name;
            }
            switch (period)
            {
            case TreatPeroid.AfterTreatment.OneWeek:
                periodName = "治疗后第1周";
                break;

            case TreatPeroid.AfterTreatment.OneMonth:
                periodName = "治疗后1月";
                break;

            case TreatPeroid.AfterTreatment.ThreeMonth:
                periodName = "治疗后3月";
                break;

            case TreatPeroid.AfterTreatment.SixMonth:
                periodName = "治疗后6月";
                break;

            case TreatPeroid.AfterTreatment.OneYear:
                periodName = "治疗后1年";
                break;

            case TreatPeroid.AfterTreatment.TwoYear:
                periodName = "治疗后2年";
                break;

            case TreatPeroid.AfterTreatment.ThreeYear:
                periodName = "治疗后3年 ";
                break;

            case TreatPeroid.AfterTreatment.FourYear:
                periodName = "治疗后4年";
                break;

            case TreatPeroid.AfterTreatment.FiveYear:
                periodName = "治疗后5年";
                break;
            }
            StringBuilder sb = new StringBuilder();

            sb.Append("填写");
            sb.Append(periodName);
            sb.Append("随访数据 - ");
            sb.Append("[患者:");
            sb.Append(patientName);
            sb.Append("]");
            this.Text = sb.ToString();
            BindWeekInfo();
            FreezeForm.ChangeControlEditable(this, false);
        }