Esempio n. 1
0
        /// <summary>
        /// Init
        /// </summary>
        void Init()
        {
            try
            {
                this.dteStart.Text = "2020-01-01";
                this.dteEnd.Text   = DateTime.Now.ToString("yyyy-MM-dd");
                List <EntityParm> lstParams = new List <EntityParm>();
                EntityParm        vo        = new EntityParm();
                vo.key   = "queryDate";
                vo.value = this.dteStart.Text + "|" + this.dteEnd.Text;
                lstParams.Add(vo);

                uiHelper.BeginLoading(this);
                using (ProxyHms proxy = new ProxyHms())
                {
                    this.gcGxyRecord.DataSource = proxy.Service.GetGxyPatients(lstParams);
                    this.gcGxySf.DataSource     = proxy.Service.GetGxySfRecords(null);
                    this.gcGxyPg.DataSource     = proxy.Service.GetGxyPgRecords(null);
                }
            }
            finally
            {
                uiHelper.CloseLoading(this);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 刷新
        /// </summary>
        public override void RefreshData()
        {
            try
            {
                List <EntityParm> lstParams = new List <EntityParm>();
                EntityParm        vo        = new EntityParm();
                vo.key   = "queryDate";
                vo.value = this.dteStart.Text + "|" + this.dteEnd.Text;
                lstParams.Add(vo);

                uiHelper.BeginLoading(this);
                using (ProxyHms proxy = new ProxyHms())
                {
                    this.gcGxyRecord.DataSource = proxy.Service.GetGxyPatients(lstParams);
                    this.gcGxySf.DataSource     = proxy.Service.GetGxySfRecords(null);
                    this.gcGxyPg.DataSource     = proxy.Service.GetGxyPgRecords(null);
                    this.gcGxyRecord.RefreshDataSource();
                    this.gcGxySf.RefreshDataSource();
                    this.gcGxyPg.RefreshDataSource();
                }
            }
            finally
            {
                uiHelper.CloseLoading(this);
            }
        }
Esempio n. 3
0
        void SetData()
        {
            using (ProxyHms proxy = new ProxyHms())
            {
                dicTjResult = proxy.Service.GetTjResult(tjReport.reportNo, out lstTjResult, out lstXjResult, out tjjljy);
            }
            List <EntityTjResult> lstResult = null;
            int height = 0;

            if (lstXjResult != null)
            {
                foreach (var vo in lstXjResult)
                {
                    lstResult = dicTjResult[vo.itemCode];
                    ucReportItem uc = new ucReportItem(lstResult, vo);
                    uc.Dock = DockStyle.Top;
                    plResult.Controls.Add(uc);
                    height += uc.Height;
                }

                plResult.Height = height + 10;
            }

            if (tjjljy != null)
            {
                this.memResult.Text = tjjljy.results + Environment.NewLine + tjjljy.sumup;
                this.memSugg.Text   = tjjljy.suggTage;
            }
        }
Esempio n. 4
0
        private void blbiQuery_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            List <EntityParm> parms  = new List <EntityParm>();
            string            search = this.txtClientName.Text;
            EntityParm        vo     = new EntityParm();

            vo.key   = "search";
            vo.value = search;
            parms.Add(vo);
            List <EntityClientInfo> lstClient = null;
            string clientNoStr = string.Empty;

            if (!string.IsNullOrEmpty(search))
            {
                using (ProxyHms proxy = new ProxyHms())
                {
                    lstClient = proxy.Service.GetClientInfoAndRpt(parms);
                }
            }

            if (lstClient != null)
            {
                foreach (var client in lstClient)
                {
                    clientNoStr += "'" + client.clientNo + "',";
                }
            }

            if (!string.IsNullOrEmpty(clientNoStr))
            {
                List <EntityClientTnbResult> lstTnbResult = null;
                clientNoStr = "(" + clientNoStr.TrimEnd(',') + ")";
                using (ProxyHms proxy = new ProxyHms())
                {
                    lstTnbResult = proxy.Service.GetClientTnbResults(clientNoStr);
                }

                foreach (var clientVo in lstClient)
                {
                    EntityClientTnbResult tnbResult = null;
                    if (lstTnbResult != null)
                    {
                        tnbResult = lstTnbResult.Find(r => r.clientNo == clientVo.clientNo && r.regTimes == clientVo.regTimes);
                    }
                    else
                    {
                        lstTnbResult = new List <EntityClientTnbResult>();
                    }
                    if (tnbResult == null)
                    {
                        tnbResult = new EntityClientTnbResult();
                        lstTnbResult.Add(tnbResult);
                    }
                    tnbResult = Function.MapperToModel(tnbResult, clientVo);
                }
                this.gcData.DataSource = lstTnbResult;
                this.gcData.RefreshDataSource();
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Save
        /// </summary>
        void Save()
        {
            EntityDicPeItem itemVo = new EntityDicPeItem();

            itemVo.itemName = this.txtItemName.Text.Trim();
            if (this.lueDept.Properties.DBRow != null)
            {
                itemVo.deptId = (this.lueDept.Properties.DBRow as EntityDicPeDepartment).deptId;
            }
            itemVo.minValue = Function.Dec(this.txtMinAge.Text);
            itemVo.maxValue = Function.Dec(this.txtMaxAge.Text);
            itemVo.refRange = this.txtRef.Text.Trim();
            itemVo.gender   = this.cboSex.SelectedIndex;
            //itemVo.displayPosition = "displayPosition";
            itemVo.unit      = this.txtUnit.Text.Trim();
            itemVo.itemInfo  = this.txtIntroduce.Text.Trim();
            itemVo.isCompare = this.cboCompare.SelectedIndex;
            itemVo.isMain    = this.cboImport.SelectedIndex;
            itemVo.sortNo    = Function.Int(this.txtSortNo.Text);

            if (this.PeItemVo != null)
            {
                itemVo.itemId = this.PeItemVo.itemId;
            }
            if (string.IsNullOrEmpty(itemVo.itemName))
            {
                DialogBox.Msg("项目名称不能为空,请填写。");
                this.txtItemName.Focus();
                return;
            }
            if (string.IsNullOrEmpty(itemVo.deptId))
            {
                DialogBox.Msg("项目科室不能为空,请选择。");
                this.lueDept.Focus();
                return;
            }

            string itemId = string.Empty;

            using (ProxyHms proxy = new ProxyHms())
            {
                if (proxy.Service.SavePeItem(itemVo, out itemId) > 0)
                {
                    if (this.PeItemVo == null)
                    {
                        this.PeItemVo = new EntityDicPeItem()
                        {
                            itemId = itemId
                        };
                    }
                    this.IsRequireRefresh = true;
                    DialogBox.Msg("保存体检项目成功!");
                }
                else
                {
                    DialogBox.Msg("保存体检项目失败。");
                }
            }
        }
Esempio n. 6
0
 /// <summary>
 /// LoadQnDataSource
 /// </summary>
 void LoadQnDataSource()
 {
     lstDietTreatment = null;
     using (ProxyHms proxy = new ProxyHms())
     {
         lstDietTreatment = proxy.Service.GetDietTreatment();
     }
 }
Esempio n. 7
0
 /// <summary>
 /// LoadQnDataSource
 /// </summary>
 void LoadQnDataSource()
 {
     lstUserGrades = null;
     using (ProxyHms proxy = new ProxyHms())
     {
         lstUserGrades = proxy.Service.GetUserGrades();
     }
 }
Esempio n. 8
0
 /// <summary>
 /// LoadQnDataSource
 /// </summary>
 void LoadQnDataSource()
 {
     data = null;
     using (ProxyHms proxy = new ProxyHms())
     {
         data = proxy.Service.GetDietPrinciple();
     }
 }
Esempio n. 9
0
 void Init()
 {
     using (ProxyHms proxy = new ProxyHms())
     {
         lstPromotionPlan       = proxy.Service.GetPromotionPlanRecords(null);
         gridControl.DataSource = lstPromotionPlan;
         gridControl.RefreshDataSource();
     }
 }
Esempio n. 10
0
 /// <summary>
 /// 刷新
 /// </summary>
 public override void RefreshData()
 {
     using (ProxyHms proxy = new ProxyHms())
     {
         this.gcTnbRecord.DataSource = proxy.Service.GetTnbPatients(null);
         this.gcTnbSf.DataSource     = proxy.Service.GetTnbSfRecords(null);
         this.gcTnbPg.DataSource     = proxy.Service.GetTnbPgRecords(null);
     }
 }
Esempio n. 11
0
        private void blbiAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            EntityClientTnbResult gxyResult = GetRowObject();

            if (gxyResult == null)
            {
                return;
            }
            List <EntityParm> parms = new List <EntityParm>();
            EntityParm        vo1   = new EntityParm();

            vo1.key   = "clientNo";
            vo1.value = gxyResult.clientNo;
            parms.Add(vo1);

            EntityParm vo2 = new EntityParm();

            vo2.key   = "regTimes";
            vo2.value = gxyResult.regTimes.ToString();
            parms.Add(vo2);

            using (ProxyHms proxy = new ProxyHms())
            {
                List <EntityTnbRecord> lstRecord = proxy.Service.GetTnbPatients(parms);

                if (lstRecord != null)
                {
                    DialogBox.Msg("人员已添加,请重新选择!");
                    return;
                }
            }

            EntityTnbRecord tnbRecorde = new EntityTnbRecord();

            tnbRecorde.clientNo  = gxyResult.clientNo;
            tnbRecorde.regNo     = gxyResult.regNo;
            tnbRecorde.beginDate = DateTime.Now;
            tnbRecorde.regTimes  = gxyResult.regTimes;
            tnbRecorde.status    = 0;
            decimal recId = 0;

            using (ProxyHms proxy = new ProxyHms())
            {
                int affect = proxy.Service.SaveTnbRecord(tnbRecorde, out recId);
                if (affect > 0)
                {
                    isRefresh        = true;
                    tnbRecorde.recId = recId;
                    DialogBox.Msg("添加成功!");
                }
                else
                {
                    DialogBox.Msg("添加失败!");
                }
            }
        }
Esempio n. 12
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void blbiAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            EntityClientInfo client = GetRowObject();

            if (client == null)
            {
                return;
            }
            List <EntityParm> parms = new List <EntityParm>();
            EntityParm        vo1   = new EntityParm();

            vo1.key   = "clientNo";
            vo1.value = client.clientNo;
            parms.Add(vo1);

            EntityParm vo2 = new EntityParm();

            vo2.key   = "regTimes";
            vo2.value = client.regTimes.ToString();
            parms.Add(vo2);

            using (ProxyHms proxy = new ProxyHms())
            {
                List <EntitymModelAccessRecord> lstRecord = proxy.Service.GetModelAccessRec(parms);

                if (lstRecord != null)
                {
                    DialogBox.Msg("人员已添加,请重新选择!");
                    return;
                }
            }

            EntitymModelAccessRecord mdAccessRec = new EntitymModelAccessRecord();

            mdAccessRec.clientNo   = client.clientNo;
            mdAccessRec.regNo      = client.regNo;
            mdAccessRec.recordDate = DateTime.Now;
            mdAccessRec.regTimes   = client.regTimes;
            mdAccessRec.status     = 0;
            decimal recId = 0;

            using (ProxyHms proxy = new ProxyHms())
            {
                int affect = proxy.Service.SaveMdAccessRecord(mdAccessRec, out recId);
                if (affect > 0)
                {
                    isRefresh         = true;
                    mdAccessRec.recId = recId;
                    DialogBox.Msg("添加成功!");
                }
                else
                {
                    DialogBox.Msg("添加失败!");
                }
            }
        }
Esempio n. 13
0
 /// <summary>
 /// LoadQnDataSource
 /// </summary>
 void LoadQnDataSource()
 {
     lstDicIngredientClassify = null;
     lstDicDientIngredient    = null;
     using (ProxyHms proxy = new ProxyHms())
     {
         lstDicIngredientClassify = proxy.Service.GetDicIngredientClassify();
         lstDicDientIngredient    = proxy.Service.GetDicDietIngredient();
     }
 }
Esempio n. 14
0
 /// <summary>
 /// LoadQnDataSource
 /// </summary>
 void LoadQnDataSource()
 {
     lstCaiRecipe = null;
     lstCai       = null;
     using (ProxyHms proxy = new ProxyHms())
     {
         lstCaiRecipe = proxy.Service.GetDicCaiRecipe();
         lstCai       = proxy.Service.GetDicCai();
     }
 }
Esempio n. 15
0
 /// <summary>
 /// LoadQnDataSource
 /// </summary>
 void LoadQnDataSource()
 {
     lstDietTemplate     = null;
     lstDietTemplatetype = null;
     using (ProxyHms proxy = new ProxyHms())
     {
         lstDietTemplate     = proxy.Service.GetDietTemplate();
         lstDietTemplatetype = proxy.Service.GetDietTemplatetype();
     }
 }
Esempio n. 16
0
        /// <summary>
        /// Save
        /// </summary>
        void Save()
        {
            EntityDicQnSummary mainVo = new EntityDicQnSummary();

            mainVo.qnClassId     = 2;
            mainVo.typeId        = Convert.ToString(this.cboType.SelectedIndex + 1);
            mainVo.isParent      = 1;
            mainVo.fieldName     = this.txtFieldName.Text.Trim();
            mainVo.comment       = this.txtComment.Text.Trim();
            mainVo.isEssential   = this.rdoEssential.SelectedIndex;
            mainVo.status        = this.rdoStatus.SelectedIndex;
            mainVo.sortNo        = Function.Int(this.txtSortNo.Text);
            mainVo.parentFieldId = " ";

            if (this.TopicVo != null)
            {
                mainVo.fieldId = this.TopicVo.fieldId;
            }
            if (string.IsNullOrEmpty(mainVo.fieldName))
            {
                DialogBox.Msg("题目名称不能为空,请填写。");
                this.txtFieldName.Focus();
                return;
            }

            this.gvItems.CloseEditor();
            List <EntityDicQnSummary> lstSub = new List <EntityDicQnSummary>();

            if (this.gvItems.RowCount > 0)
            {
                lstSub = this.gvDataBindingSourceItems.DataSource as List <EntityDicQnSummary>;
            }
            string fieldId = string.Empty;

            using (ProxyHms proxy = new ProxyHms())
            {
                if (proxy.Service.SaveQnTopic(mainVo, lstSub, out fieldId) > 0)
                {
                    if (this.TopicVo == null)
                    {
                        this.TopicVo = new EntityDicQnSummary()
                        {
                            fieldId = fieldId
                        };
                    }
                    this.IsRequireRefresh = true;
                    DialogBox.Msg("保存题目成功!");
                }
                else
                {
                    DialogBox.Msg("保存题目失败。");
                }
            }
        }
Esempio n. 17
0
 void Init()
 {
     using (ProxyHms proxy = new ProxyHms())
     {
         List <EntityParm> dicParm = new List <EntityParm>();
         dicParm.Add(Function.GetParm("auditState", "('3')"));
         lstPromotionPlan             = proxy.Service.GetPromotionPlans(dicParm);
         gcPromotionRecord.DataSource = lstPromotionPlan;
         gcPromotionRecord.RefreshDataSource();
     }
 }
Esempio n. 18
0
        /// <summary>
        /// RefreshData
        /// </summary>
        public override void RefreshData()
        {
            uiHelper.BeginLoading(this);

            using (ProxyHms proxy = new ProxyHms())
            {
                lstQnRecords = proxy.Service.GetQnRecords(null);
            }
            this.gcQnRecord.DataSource = lstQnRecords;
            this.gcQnRecord.RefreshDataSource();
            uiHelper.CloseLoading(this);
        }
Esempio n. 19
0
        /// <summary>
        /// Save
        /// </summary>
        void Save()
        {
            EntityDicHazards hazaVo = new EntityDicHazards();

            hazaVo.classId = this.cboClass.SelectedIndex + 1;
            hazaVo.hazards = this.txtHazards.Text.Trim();
            if (this.lueTopic.Properties.DBRow != null)
            {
                hazaVo.topicId   = (this.lueTopic.Properties.DBRow as EntityDicQnSetting).fieldId;
                hazaVo.topicName = (this.lueTopic.Properties.DBRow as EntityDicQnSetting).fieldName;
            }
            if (this.lueField.Properties.DBRow != null)
            {
                hazaVo.fieldId   = (this.lueField.Properties.DBRow as EntityDicQnSetting).fieldId;
                hazaVo.fieldName = (this.lueField.Properties.DBRow as EntityDicQnSetting).fieldName;
            }
            hazaVo.suggest = this.txtSuggest.Text.Trim();
            hazaVo.sortNo  = Function.Int(this.txtSortNo.Text);

            if (this.HazardsVo != null)
            {
                hazaVo.hId = this.HazardsVo.hId;
            }
            if (string.IsNullOrEmpty(hazaVo.hazards))
            {
                DialogBox.Msg("危险因素信息不能为空,请填写。");
                this.txtHazards.Focus();
                return;
            }

            decimal hId = 0;

            using (ProxyHms proxy = new ProxyHms())
            {
                if (proxy.Service.SaveHazards(hazaVo, out hId) > 0)
                {
                    if (this.HazardsVo == null)
                    {
                        this.HazardsVo = new EntityDicHazards()
                        {
                            hId = hId
                        };
                    }
                    this.IsRequireRefresh = true;
                    DialogBox.Msg("保存危险因素成功!");
                }
                else
                {
                    DialogBox.Msg("保存危险因素失败。");
                }
            }
        }
Esempio n. 20
0
        /// <summary>
        /// SaveData
        /// </summary>
        /// <returns></returns>
        void SaveData()
        {
            if (pgVo == null)
            {
                pgVo       = new EntityTnbPg();
                pgVo.recId = tnbRecord.recId;
            }
            if (tnbRecord == null)
            {
                tnbRecord       = new EntityTnbRecord();
                tnbRecord.recId = pgVo.recId;
            }

            if (chkManageLevel01.Checked == true)
            {
                pgVo.manageLevel = "1";
            }
            if (chkManageLevel02.Checked == true)
            {
                pgVo.manageLevel = "2";
            }
            if (chkManageLevel03.Checked == true)
            {
                pgVo.manageLevel = "3";
            }

            pgVo.evaluator = lueEnaOper.EditValue.ToString();
            pgVo.evaDate   = Function.Datetime(dteEnaDate.Text);
            pgData         = new EntityTnbPgData();
            pgData.xmlData = GetData();
            decimal pgId  = 0;
            bool    isNew = this.pgVo.pgId <= 0 ? true : false;

            using (ProxyHms proxy = new ProxyHms())
            {
                if (proxy.Service.SaveTnbPgRecord(this.tnbRecord, this.pgVo, this.pgData, out pgId) > 0)
                {
                    this.IsRequireRefresh = true;
                    if (isNew)
                    {
                        this.pgVo.pgId   = pgId;
                        this.pgData.pgId = pgId;
                    }

                    DialogBox.Msg("保存成功!");
                }
                else
                {
                    DialogBox.Msg("保存失败。");
                }
            }
        }
Esempio n. 21
0
        private void blbiSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            using (ProxyHms proxy = new ProxyHms())
            {
                SportItemVo.sportNo       = this.txtSportNo.Text.Trim();
                SportItemVo.sportName     = this.txtSportName.Text.Trim();
                SportItemVo.metValue      = Function.Dec(this.txtMetValue.Text);
                SportItemVo.sportTime     = this.cboSportTime.SelectedIndex + 1;
                SportItemVo.sportType     = Convert.ToString(this.cboSportType.SelectedIndex + 1);
                SportItemVo.sportNum      = this.cboSportNum.SelectedIndex + 1;
                SportItemVo.minAge        = Function.Dec(this.txtMinAge.Text);
                SportItemVo.maxAge        = Function.Dec(this.txtMaxAge.Text);
                SportItemVo.sex           = this.cboSex.SelectedIndex.ToString();
                SportItemVo.announcements = this.txtAnnouncements.Text.Trim();
                SportItemVo.effect        = this.txtEffect.Text.Trim();
                SportItemVo.decription    = this.txtDecription.Text.Trim();
                SportItemVo.creatorId     = GlobalLogin.objLogin.EmpNo;
                SportItemVo.creatDate     = DateTime.Now;
                SportItemVo.organId       = GlobalHospital.HospitalCode;

                if (SportItemVo.sportNo == string.Empty)
                {
                    DialogBox.Msg("请输入编号。");
                    this.txtSportNo.Focus();
                    return;
                }

                if (SportItemVo.sportName == string.Empty)
                {
                    DialogBox.Msg("请输入名称。");
                    this.txtSportName.Focus();
                    return;
                }

                decimal templateId = 0;
                bool    isNew      = SportItemVo.sId <= 0 ? true : false;
                if (proxy.Service.SaveSportItem(SportItemVo, out templateId) > 0)
                {
                    this.IsRequireRefresh = true;
                    if (isNew)
                    {
                        SportItemVo.sId = templateId;
                    }
                    DialogBox.Msg("保存成功!");
                }
                else
                {
                    DialogBox.Msg("保存失败。");
                }
            }
        }
Esempio n. 22
0
        /// <summary>
        ///
        /// </summary>
        void Query()
        {
            List <EntityParm> dicParm   = new List <EntityParm>();
            string            beginDate = string.Empty;
            string            endDate   = string.Empty;

            beginDate = dteBegin.Text.Trim();
            endDate   = dteEnd.Text.Trim();

            if (beginDate != string.Empty && endDate != string.Empty)
            {
                if (Function.Datetime(beginDate + " 00:00:00") > Function.Datetime(endDate + " 00:00:00"))
                {
                    DialogBox.Msg("开始时间不能大于结束时间。");
                    return;
                }
                dicParm.Add(Function.GetParm("queryDate", beginDate + "|" + endDate));
            }

            if (this.txtClientName.Text.Trim() != string.Empty)
            {
                dicParm.Add(Function.GetParm("clientName", this.txtClientName.Text.Trim()));
            }
            if (this.txtClientNo.Text.Trim() != string.Empty)
            {
                dicParm.Add(Function.GetParm("clientNo", this.txtClientNo.Text.Trim()));
            }

            try
            {
                uiHelper.BeginLoading(this);
                if (dicParm.Count > 0)
                {
                    using (ProxyHms proxy = new ProxyHms())
                    {
                        this.gcData.DataSource = proxy.Service.GetDietRecords(dicParm);
                        this.gcData.RefreshDataSource();
                    }
                }
                else
                {
                    DialogBox.Msg("请输入查询条件。");
                }
            }
            finally
            {
                uiHelper.CloseLoading(this);
            }
        }
Esempio n. 23
0
 /// <summary>
 /// Init
 /// </summary>
 void Init()
 {
     try
     {
         uiHelper.BeginLoading(this);
         using (ProxyHms proxy = new ProxyHms())
         {
             this.gridControl1.DataSource = proxy.Service.GetReportTemplate();
         }
     }
     finally
     {
         uiHelper.CloseLoading(this);
     }
 }
Esempio n. 24
0
 /// <summary>
 /// 绑定数据源
 /// </summary>
 private void BindData()
 {
     try
     {
         uiHelper.BeginLoading(this);
         using (ProxyHms proxy = new ProxyHms())
         {
             this.gcData.DataSource = proxy.Service.GetReportTemplateDetail();
         }
     }
     finally
     {
         uiHelper.CloseLoading(this);
     }
 }
Esempio n. 25
0
        /// <summary>
        /// Save
        /// </summary>
        void Save()
        {
            EntityDicQnMain vo = new EntityDicQnMain();

            vo.qnName    = this.txtQNname.Text.Trim();
            vo.qnDesc    = this.txtQNdesc.Text.Trim();
            vo.status    = this.cboStatus.SelectedIndex;
            vo.classId   = 1;   // 普通问卷
            vo.creatorId = GlobalLogin.objLogin.EmpNo;
            vo.creatDate = DateTime.Now;
            if (this.QnVo != null && this.QnVo.qnId > 0)
            {
                vo.qnId = this.QnVo.qnId;
            }
            // 明细缓
            List <EntityDicQnDetail>      lstDet      = new List <EntityDicQnDetail>();
            List <EntityDicQnCtlLocation> lstLocation = new List <EntityDicQnCtlLocation>();
            List <EntityDicQnSetting>     lstSettings = new List <EntityDicQnSetting>();

            foreach (KeyValuePair <int, IQuest> kvp in dicQuestCtrl)
            {
                lstDet.AddRange(kvp.Value.GetQnCtrls());
                lstLocation.Add(kvp.Value.GetQnCtrlsLocation());
                lstSettings.AddRange(kvp.Value.GetQnSettings());
            }

            decimal qnId = 0;

            using (ProxyHms proxy = new ProxyHms())
            {
                if (proxy.Service.SaveQNnormal(vo, lstDet, out qnId, lstLocation, lstSettings) > 0)
                {
                    if (this.QnVo == null)
                    {
                        this.QnVo = new EntityDicQnMain()
                        {
                            qnId = qnId
                        };
                    }
                    this.IsRequireRefresh = true;
                    DialogBox.Msg("保存问卷成功!");
                }
                else
                {
                    DialogBox.Msg("保存问卷失败。");
                }
            }
        }
Esempio n. 26
0
        /// <summary>
        /// LoadQnDataSource
        /// </summary>
        void LoadQnDataSource()
        {
            lstClientInfo = null;
            List <EntityParm> dicParm   = new List <EntityParm>();
            string            beginDate = DateTime.Now.AddDays(-7).ToString("yyyy.MM.dd");
            string            endDate   = DateTime.Now.ToString("yyyy.MM.dd");

            if (beginDate != string.Empty && endDate != string.Empty)
            {
                dicParm.Add(Function.GetParm("genDate", beginDate + "|" + endDate));
            }
            using (ProxyHms proxy = new ProxyHms())
            {
                lstClientInfo = proxy.Service.GetClientInfoAndRpt(dicParm);
            }
        }
Esempio n. 27
0
        public void Init()
        {
            List <EntityParm> parms = new List <EntityParm>();

            voParm       = new EntityParm();
            voParm.key   = "qnType";
            voParm.value = "2";
            parms.Add(voParm);
            using (ProxyHms proxy = new ProxyHms())
            {
                lstQnRecords = proxy.Service.GetQnRecords(parms);
            }

            this.gcQnRecord.DataSource = lstQnRecords;
            this.gcQnRecord.RefreshDataSource();
        }
Esempio n. 28
0
 /// <summary>
 /// RefreshData
 /// </summary>
 public override void RefreshData()
 {
     try
     {
         uiHelper.BeginLoading(this);
         using (ProxyHms proxy = new ProxyHms())
         {
             this.gridControl.DataSource = proxy.Service.GetQnList();
             this.gridControl.RefreshDataSource();
         }
     }
     finally
     {
         uiHelper.CloseLoading(this);
     }
 }
Esempio n. 29
0
        /// <summary>
        /// LoadQnDataSource
        /// </summary>
        void LoadQnDataSource()
        {
            lstTjReport = null;
            List <EntityParm> dicParm   = new List <EntityParm>();
            string            beginDate = this.dteBegin.Text + " 00:00:00";
            string            endDate   = this.dteEnd.Text + " 23:59:59";

            if (beginDate != string.Empty && endDate != string.Empty)
            {
                dicParm.Add(Function.GetParm("reportDate", beginDate + "|" + endDate));
            }
            using (ProxyHms proxy = new ProxyHms())
            {
                lstTjReport = proxy.Service.GetTjReports(dicParm);
            }
        }
Esempio n. 30
0
 /// <summary>
 /// Init
 /// </summary>
 void Init()
 {
     try
     {
         uiHelper.BeginLoading(this);
         using (ProxyHms proxy = new ProxyHms())
         {
             data = proxy.Service.GetDietPrinciple();
             this.gridControl.DataSource = data;
         }
     }
     finally
     {
         uiHelper.CloseLoading(this);
     }
 }