public override BizDataItems QueryDatas(string dataIdentificationName)
        {
            BizDataItems resultDatas = null;
            BizDataItem  bdi         = null;

            switch (dataIdentificationName)
            {
            case Const_Data_SelStudyData:
                resultDatas = new BizDataItems();
                bdi         = new BizDataItem();

                bdi.Add("ID", _studyData.StudyId);
                bdi.Add("姓名", _studyData.Name);

                resultDatas.Add(bdi);

                return(resultDatas);

            default:
                return(null);
            }

            //switch (dataItemName)
            //{
            //    case "ID":
            //        return _studyData.StudyId;
            //    case "姓名":
            //        return _studyData.Name;
            //    default:
            //        return null;
            //}
        }
Beispiel #2
0
        public override IBizDataItems QueryDatas(string dataIdentificationName)
        {
            BizDataItems resultDatas = null;
            BizDataItem  dataItem    = null;

            string dataName = _provideDataDesc.FormatDataName(_moduleName, dataIdentificationName);

            switch (dataName)
            {
            case QueryDataDefine.QueryResult:    //方法当前查询到的数据结果
                resultDatas = new BizDataItems();
                dataItem    = new BizDataItem();

                dataItem.Add(DataHelper.StdPar_QueryResult, _queryTable);
                dataItem.Add(DataHelper.StdPar_QueryCfgFormat, _queryCfgFormat);
                dataItem.Add(DataHelper.StdPar_QueryDbAlias, _queryDbAlias);

                resultDatas.Add(dataItem);

                return(resultDatas);

            default:
                return(null);
            }
        }
        private void tsbWrite_Click(object sender, EventArgs e)
        {
            try
            {
                //写入修改后的配套词句
                if (_selWordDatas != null)
                {
                    _selWordDatas.Clear();
                }

                if (treeView1.SelectedNode == null)
                {
                    return;
                }

                if (treeView1.SelectedNode.Tag is ReportWordsClassData)
                {
                    return;
                }

                ReportWordsInfoData wordData = treeView1.SelectedNode.Tag as ReportWordsInfoData;
                if (wordData == null)
                {
                    MessageBox.Show("无效词句内容数据。", "提示");
                    return;
                }

                if (_selWordDatas == null)
                {
                    _selWordDatas = new BizDataItems();
                }

                if (wordData.词句信息.词句类型 == (int)ReportWordType.rwtFree)
                {
                    foreach (WordContext.RichTextItem rti in wordContext1.Items)
                    {
                        if (rti.Tag.ToString() == "共用词句")
                        {
                            continue;
                        }

                        BizDataItem bi = new BizDataItem();
                        bi.Add("sectionname", rti.Tag.ToString());
                        bi.Add("text", rti.Text);
                        bi.Add("formattext", rti.Rtf);

                        _selWordDatas.Add(bi);
                    }
                }

                DoActions(_designEvents[WordProviderEventDefine.WriteWord], sender);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
        private void treeView1_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                //写入配套词句
                if (_selWordDatas != null)
                {
                    _selWordDatas.Clear();
                }

                if (treeView1.SelectedNode == null)
                {
                    return;
                }

                if (treeView1.SelectedNode.Tag is ReportWordsClassData)
                {
                    return;
                }

                ReportWordsInfoData wordData = treeView1.SelectedNode.Tag as ReportWordsInfoData;
                if (wordData == null)
                {
                    MessageBox.Show("无效词句内容数据。", "提示");
                    return;
                }


                if (_selWordDatas == null)
                {
                    _selWordDatas = new BizDataItems();
                }

                if (wordData.词句信息.词句类型 == (int)ReportWordType.rwtFree)
                {
                    foreach (JReportWordSection wordSection in wordData.词句信息.词句明细)
                    {
                        BizDataItem bi = new BizDataItem();
                        bi.Add("sectionname", wordSection.段落名称);
                        bi.Add("text", wordSection.段落内容);
                        bi.Add("formattext", wordSection.段落格式);

                        _selWordDatas.Add(bi);
                    }
                }

                DoActions(_designEvents[WordProviderEventDefine.WriteWord], sender);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
        public override IBizDataItems QueryDatas(string dataIdentificationName)
        {
            string dataName = _provideDataDesc.FormatDataName(_moduleName, dataIdentificationName);

            BizDataItems resultDatas = null;
            BizDataItem  dataItem    = null;

            switch (dataName)
            {
            case CharDataDefine.SelCharContext:

                if (listView1.SelectedItems.Count <= 0)
                {
                    return(null);
                }

                resultDatas = new BizDataItems();

                dataItem = new BizDataItem();
                dataItem.Add(DataHelper.StdPar_Text, listView1.SelectedItems[0].Text);

                resultDatas.Add(dataItem);

                return(resultDatas);

            default:
                return(null);
            }
        }
        private void WordContext_Click(object sender, EventArgs e)
        {
            try
            {
                if (_selWordDatas != null)
                {
                    _selWordDatas.Clear();
                }

                //写入选择词句
                if (wordContext1.SelectedItem == null)
                {
                    return;
                }

                string sectionName = wordContext1.SelectedItem.Tag;


                if (_selWordDatas == null)
                {
                    _selWordDatas = new BizDataItems();
                }

                BizDataItem bi = new BizDataItem();
                bi.Add("sectionname", sectionName);
                if (string.IsNullOrEmpty(wordContext1.SelectedItem.SelText))
                {
                    bi.Add("text", wordContext1.SelectedItem.Text);
                    bi.Add("formattext", wordContext1.SelectedItem.Rtf);
                }
                else
                {
                    bi.Add("text", wordContext1.SelectedItem.SelText);
                    bi.Add("formattext", wordContext1.SelectedItem.SelRtf);
                }

                _selWordDatas.Add(bi);

                DoActions(_designEvents[WordProviderEventDefine.WriteWord], sender);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
Beispiel #7
0
        /// <summary>
        /// 获取多个数据
        /// 提供数据检索处理,返回bizdataitems给其他业务模块
        /// </summary>
        /// <param name="dataIdentificationName"></param>
        /// <returns></returns>
        public override IBizDataItems QueryDatas(string dataIdentificationName)
        {
            BizDataItems bdis     = new BizDataItems();
            string       dataName = _provideDataDesc.FormatDataName(_moduleName, dataIdentificationName);

            try
            {
                switch (dataName)
                {
                case ViewTableProviderDataDefine.Data_SelectedRow:

                    if (_dtSource is null)
                    {
                        bdis = null;
                    }
                    else
                    {
                        BizDataItem bi = new BizDataItem();
                        bi.Add("数据表格", _dtSource);
                        KeyValuePair <string, string> kvp = _dicApplyID.FirstOrDefault();
                        bi.Add(kvp.Key, kvp.Value);
                        if (_hisServerCfgData != null)
                        {
                            bi.Add("HIS服务配置", _hisServerCfgData);
                        }
                        bdis.Add(bi);
                    }
                    break;

                case ViewTableProviderDataDefine.Data_Table:
                    break;

                default:
                    break;;
                }
                return(bdis);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
                return(null);
            }
        }
        public override IBizDataItems QueryDatas(string dataIdentificationName)
        {
            BizDataItems resultDatas = new BizDataItems();
            BizDataItem  dataItem    = new BizDataItem();
            string       dataName    = _provideDataDesc.FormatDataName(_moduleName, dataIdentificationName);

            if (dataName != TestDataDefine.CurTestData)
            {
                return(null);
            }

            List <TestDataItem> curDatas = null;

            if (_designDatas != null && _designDatas.Count > 0)
            {
                curDatas = _designDatas;
            }
            if (_localDatas != null && _localDatas.Count > 0)
            {
                curDatas = _localDatas;
            }

            foreach (TestDataItem di in curDatas)
            {
                if (di.数据类型 == "字符串")
                {
                    dataItem.Add(di.数据名称, di.数据内容);
                }
                else if (di.数据类型 == "字典")
                {
                    dataItem.Add(di.数据名称, DictionaryJsonHelper.DeserializeStringToDictionary <string, string>(di.数据内容));
                }
                else
                {
                    dataItem.Add(di.数据名称, "不能识别的数据类型");
                }
            }

            resultDatas.Add(dataItem);

            return(resultDatas);
        }
        public override IBizDataItems QueryDatas(string dataIdentificationName)
        {
            BizDataItems resultDatas = null;
            BizDataItem  dataItem    = null;

            string dataName = _provideDataDesc.FormatDataName(_moduleName, dataIdentificationName);

            switch (dataName)
            {
            case QueueQuickDataDefine.CurCallLineup:    //当前操作的排队信息
                resultDatas = new BizDataItems();
                dataItem    = new BizDataItem();

                dataItem.Add(DataHelper.StdPar_LineupId, _curOperLineupInfo.LineupId);

                dataItem.Add(DataHelper.StdPar_QueueId, _curOperLineupInfo.QueueId);
                dataItem.Add(DataHelper.StdPar_QueueName, _curOperLineupInfo.QueueName);

                dataItem.Add(DataHelper.StdPar_ApplyId, _curOperLineupInfo.ApplyId);
                dataItem.Add(DataHelper.StdPar_PatientId, _curOperLineupInfo.PatientId);
                dataItem.Add(DataHelper.StdPar_PatiName, _curOperLineupInfo.PatientName);

                resultDatas.Add(dataItem);

                return(resultDatas);

            default:
                return(null);
            }
        }
        public override IBizDataItems QueryDatas(string dataIdentificationName)
        {
            BizDataItems resultDatas = null;
            BizDataItem  dataItem    = null;

            string dataName = _provideDataDesc.FormatDataName(_moduleName, dataIdentificationName);

            switch (dataName)
            {
            case QueueStateDataDefine.ClickQueue:    //当前采集的图像数据
                resultDatas = new BizDataItems();
                dataItem    = new BizDataItem();

                dataItem.Add(DataHelper.StdPar_QueueId, _clickQueueId);
                dataItem.Add(DataHelper.StdPar_QueueName, _clickQueueName);

                resultDatas.Add(dataItem);

                return(resultDatas);

            default:
                return(null);
            }
        }
Beispiel #11
0
        public override IBizDataItems QueryDatas(string dataIdentificationName)
        {
            BizDataItems resultDatas = null;
            BizDataItem  dataItem    = null;

            string dataName = _provideDataDesc.FormatDataName(_moduleName, dataIdentificationName);

            switch (dataName)
            {
            case LabDataDefine.GetTextContext:    //方法当前查询到的数据结果
                resultDatas = new BizDataItems();
                dataItem    = new BizDataItem();

                dataItem.Add(DataHelper.StdPar_TextContext, labContext.Text);

                resultDatas.Add(dataItem);

                return(resultDatas);

            default:
                return(null);
            }
        }
        public override IBizDataItems QueryDatas(string dataIdentificationName)
        {
            BizDataItems resultDatas = null;
            BizDataItem  dataItem    = null;

            TileImageInfo imgInfo = null;

            string dataName = _provideDataDesc.FormatDataName(_moduleName, dataIdentificationName);

            switch (dataName)
            {
            case ImageDataDefine.SelImageData:    //当前选择的图像
                resultDatas = new BizDataItems();

                List <TileItem> checkItems = imageView1.CheckItems;
                if (checkItems == null || checkItems.Count <= 0)
                {
                    checkItems = new List <TileItem>();
                    if (imageView1.SelItem != null)
                    {
                        checkItems.Add(imageView1.SelItem);
                    }
                }

                foreach (TileItem ti in checkItems)
                {
                    dataItem = new BizDataItem();

                    imgInfo = ti.Tag as TileImageInfo;
                    if (imgInfo == null)
                    {
                        continue;
                    }

                    dataItem.Add(DataHelper.StdPar_ApplyId, _applyId);
                    dataItem.Add(DataHelper.StdPar_MediaId, imgInfo.MediaId);
                    dataItem.Add(DataHelper.StdPar_SerialId, imgInfo.SerialId);
                    dataItem.Add(DataHelper.StdPar_StorageId, imgInfo.StorageId);
                    dataItem.Add(DataHelper.StdPar_MediaOrder, imgInfo.Order);
                    dataItem.Add(DataHelper.StdPar_MediaType, imgInfo.MediaType);
                    dataItem.Add(DataHelper.StdPar_MediaName, imgInfo.MediaName);
                    dataItem.Add(DataHelper.StdPar_IsKeyImage, imgInfo.IsKeyImage);
                    dataItem.Add(DataHelper.StdPar_IsReportImage, imgInfo.IsReportImage);
                    dataItem.Add(DataHelper.StdPar_LocalFile, imgInfo.File);
                    dataItem.Add(DataHelper.StdPar_VPath, imgInfo.VPath);


                    resultDatas.Add(dataItem);
                }

                resultDatas.Key = _applyId;
                resultDatas.Tag = null;

                return(resultDatas);

            case ImageDataDefine.MouseItemData:    //光标所在Item
                if (_mouseItem == null)
                {
                    return(null);
                }

                resultDatas = new BizDataItems();

                dataItem = new BizDataItem();

                imgInfo = _mouseItem.Tag as TileImageInfo;
                if (imgInfo == null)
                {
                    return(null);
                }

                dataItem.Add(DataHelper.StdPar_ApplyId, _applyId);
                dataItem.Add(DataHelper.StdPar_MediaId, imgInfo.MediaId);
                dataItem.Add(DataHelper.StdPar_SerialId, imgInfo.SerialId);
                dataItem.Add(DataHelper.StdPar_StorageId, imgInfo.StorageId);
                dataItem.Add(DataHelper.StdPar_MediaOrder, imgInfo.Order);
                dataItem.Add(DataHelper.StdPar_MediaType, imgInfo.MediaType);
                dataItem.Add(DataHelper.StdPar_MediaName, imgInfo.MediaName);
                dataItem.Add(DataHelper.StdPar_IsKeyImage, imgInfo.IsKeyImage);
                dataItem.Add(DataHelper.StdPar_IsReportImage, imgInfo.IsReportImage);
                dataItem.Add(DataHelper.StdPar_LocalFile, imgInfo.File);
                dataItem.Add(DataHelper.StdPar_VPath, imgInfo.VPath);


                resultDatas.Add(dataItem);

                return(resultDatas);

            default:
                return(null);
            }
        }
        public override bool ExecuteAction(string callModuleName, ISysDesign callModule, object sender, string actName, string tag, IBizDataItems bizDatas, object eventArgs = null)
        {
            try
            {
                _returnData = null;

                if (_dbHelpers == null)
                {
                    _dbHelpers = new Dictionary <string, IDBQuery>();

                    foreach (DataOperItem doi in _dataOperDesign.DataOperItems)
                    {
                        if (_dbHelpers.ContainsKey(doi.DBAlias))
                        {
                            continue;
                        }

                        string   strErr        = "";
                        IDBQuery thridDbHelper = null;

                        thridDbHelper = SqlHelper.GetThridDBHelper(doi.DBAlias, _dbQuery, ref strErr);

                        if (thridDbHelper == null)
                        {
                            MessageBox.Show("数据处理项 [" + doi.ItemName + "] 对应数据源实例化失败:" + strErr, "提示");
                            return(false);
                        }

                        _dbHelpers.Add(doi.DBAlias, thridDbHelper);
                    }
                }

                _curBizData = null;
                if (bizDatas != null)
                {
                    _curBizData = bizDatas[0] as BizDataItem;
                }

                IDBQuery curDBHelper = null;

                switch (actName)
                {
                case DataOperActionDefine.RunProcess:

                    _returnData = new BizDataItems();

                    BizDataItem returnItem = new BizDataItem();

                    if (string.IsNullOrEmpty(tag))
                    {
                        using (TransactionScope ts = new TransactionScope())
                        {
                            foreach (DataOperItem doi in _dataOperDesign.DataOperItems)
                            {
                                if (string.IsNullOrEmpty(doi.DBAlias))
                                {
                                    curDBHelper = _dbQuery;
                                }
                                else
                                {
                                    curDBHelper = _dbHelpers[doi.DBAlias];
                                }

                                DataTable dtResult = SqlHelper.GetDataSource(doi.ProcessContext, curDBHelper, QueryParValueEvent);

                                returnItem.Add(doi.ReturnName, dtResult);
                            }

                            ts.Complete();
                        }
                    }
                    else
                    {
                        int index = _dataOperDesign.DataOperItems.FindIndex(T => T.ItemName == tag);
                        if (index < 0)
                        {
                            MessageBox.Show("未找到指定处理项的配置信息。", "提示");
                            return(false);
                        }

                        DataOperItem doiProcess = _dataOperDesign.DataOperItems[index];

                        if (string.IsNullOrEmpty(doiProcess.DBAlias))
                        {
                            curDBHelper = _dbQuery;
                        }
                        else
                        {
                            curDBHelper = _dbHelpers[doiProcess.DBAlias];
                        }

                        DataTable dtResult = SqlHelper.GetDataSource(doiProcess.ProcessContext, curDBHelper, QueryParValueEvent);

                        returnItem.Add(doiProcess.ReturnName, dtResult);
                    }

                    _returnData.Add(returnItem);

                    return(true);

                default:
                    break;
                }

                return(true);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
                return(false);
            }
        }
        public override bool ExecuteAction(string callModuleName, ISysDesign callModule, object sender, string actName, string tag, IBizDataItems bizDatas, object eventArgs = null)
        {
            try
            {
                _curBizDatas = null;

                switch (actName)
                {
                case DataConvertActionDefine.RunConvert:
                    if (bizDatas == null || bizDatas.Count <= 0)
                    {
                        return(false);
                    }

                    _curBizDatas = bizDatas as BizDataItems;

                    BizDataItem curbizData = _curBizDatas[0] as BizDataItem;

                    foreach (DataConvertItem dci in _dataConvertDesign.ConvertItems)
                    {
                        if (curbizData.ContainsKey(dci.SourceName))
                        {
                            object value        = curbizData[dci.SourceName];
                            object convertValue = null;

                            curbizData.Remove(dci.SourceName);

                            switch (dci.ConvertType)
                            {
                            case "Int16":
                                if (value != null)
                                {
                                    convertValue = Convert.ToInt16(value);
                                }
                                curbizData.Add(dci.ConvertName, convertValue);
                                break;

                            case "Int32":
                                if (value != null)
                                {
                                    convertValue = Convert.ToInt32(value);
                                }
                                curbizData.Add(dci.ConvertName, convertValue);
                                break;

                            case "Int64":
                                if (value != null)
                                {
                                    convertValue = Convert.ToInt64(value);
                                }
                                curbizData.Add(dci.ConvertName, convertValue);
                                break;

                            case "Double":
                                if (value != null)
                                {
                                    convertValue = Convert.ToDouble(value);
                                }
                                curbizData.Add(dci.ConvertName, convertValue);
                                break;

                            case "Single":
                                if (value != null)
                                {
                                    convertValue = Convert.ToSingle(value);
                                }
                                curbizData.Add(dci.ConvertName, convertValue);
                                break;

                            case "Decimal":
                                if (value != null)
                                {
                                    convertValue = Convert.ToDecimal(value);
                                }
                                curbizData.Add(dci.ConvertName, convertValue);
                                break;

                            case "String":
                                if (value != null)
                                {
                                    convertValue = Convert.ToString(value);
                                }
                                curbizData.Add(dci.ConvertName, convertValue);
                                break;

                            case "DateTime":
                                if (value != null)
                                {
                                    convertValue = Convert.ToDateTime(value);
                                }
                                curbizData.Add(dci.ConvertName, convertValue);
                                break;

                            case "Boolean":
                                if (value != null)
                                {
                                    convertValue = Convert.ToBoolean(value);
                                }
                                curbizData.Add(dci.ConvertName, convertValue);
                                break;

                            case "Byte":
                                if (value != null)
                                {
                                    convertValue = Convert.ToByte(value);
                                }
                                curbizData.Add(dci.ConvertName, convertValue);
                                break;

                            case "Char":
                                if (value != null)
                                {
                                    convertValue = Convert.ToChar(value);
                                }
                                curbizData.Add(dci.ConvertName, convertValue);
                                break;


                            default:
                                break;
                            }
                        }
                    }

                    return(true);

                default:
                    break;
                }

                return(true);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
                return(false);
            }
        }
Beispiel #15
0
        public override IBizDataItems QueryDatas(string dataIdentificationName)
        {
            BizDataItems resultDatas = null;
            BizDataItem  dataItem    = null;

            string dataName = _provideDataDesc.FormatDataName(_moduleName, dataIdentificationName);

            switch (dataName)
            {
            case HistoryDataDefine.SelTextContext:    //当前文本内容
                resultDatas = new BizDataItems();
                dataItem    = new BizDataItem();

                dataItem.Add(DataHelper.StdPar_ApplyId, _applyId);
                dataItem.Add(DataHelper.StdPar_Text, richTextBox1.SelectedText);

                resultDatas.Add(dataItem);

                return(resultDatas);

            case HistoryDataDefine.SelHistoryStudy:    //当前选择的历史检查信息

                if (listView1.SelectedItems.Count <= 0)
                {
                    return(null);
                }

                resultDatas = new BizDataItems();
                dataItem    = new BizDataItem();

                dataItem.Add(DataHelper.StdPar_ApplyId, _applyId);

                ListViewItem lvi       = listView1.SelectedItems[0];
                ApplyData    applyData = lvi.Tag as ApplyData;

                dataItem.Add(DataHelper.StdPar_StudyNo, applyData.检查号);
                dataItem.Add("historyapplyid", applyData.申请ID);
                dataItem.Add("historyapplydate", applyData.申请日期);
                dataItem.Add("historyapplyidentify", applyData.申请识别码);
                dataItem.Add("historypatientid", applyData.患者ID);

                resultDatas.Add(dataItem);

                return(resultDatas);

            case HistoryDataDefine.SelHistoryReport:    //当前选择的历史报告
                if (listView1.SelectedItems.Count <= 0)
                {
                    return(null);
                }

                if (tscbxReports.Items.Count <= 0)
                {
                    return(null);
                }

                resultDatas = new BizDataItems();
                dataItem    = new BizDataItem();

                dataItem.Add(DataHelper.StdPar_ApplyId, _applyId);

                //读取历史信息
                ListViewItem lviSel          = listView1.SelectedItems[0];
                ApplyData    reportApplyData = lviSel.Tag as ApplyData;

                dataItem.Add(DataHelper.StdPar_StudyNo, reportApplyData.检查号);
                dataItem.Add("historyapplyid", reportApplyData.申请ID);
                dataItem.Add("historyapplydate", reportApplyData.申请日期);
                dataItem.Add("historyapplyidentify", reportApplyData.申请识别码);
                dataItem.Add("historypatientid", reportApplyData.患者ID);

                //读取报告信息
                ItemBind ib = tscbxReports.ComboBox.SelectedItem as ItemBind;

                if (ib.Data == null)
                {
                    return(null);
                }

                ReportContextData reportData = ib.Data as ReportContextData;

                dataItem.Add("historyreportid", reportData.报告ID);
                dataItem.Add("historyreportname", reportData.报告名称);
                dataItem.Add("historyreportdoctor", reportData.报告信息.报告医生);
                dataItem.Add("historyreportcreatedate", reportData.报告信息.创建时间);

                resultDatas.Add(dataItem);

                return(resultDatas);

            default:
                return(null);
            }
        }
Beispiel #16
0
        public override IBizDataItems QueryDatas(string dataIdentificationName)
        {
            BizDataItems resultDatas = null;
            BizDataItem  dataItem    = null;

            string dataName = _provideDataDesc.FormatDataName(_moduleName, dataIdentificationName);

            switch (dataName)
            {
            case DataViewDataDefine.FormData:    //方法当前查询到的数据结果

                resultDatas = new BizDataItems();
                dataItem    = new BizDataItem();

                foreach (ViewItem vi in dataViewLayout1.LayoutControls)
                {
                    if (vi.ReleationInstance == null)
                    {
                        continue;
                    }

                    object value = null;
                    switch (vi.ControlType)
                    {
                    case ViewControlType.Lab:
                        value = (vi.ReleationInstance as Label).Text;

                        value = (value + "-").Split('-')[0];

                        break;

                    case ViewControlType.Txt:
                        value = (vi.ReleationInstance as TextBox).Text;

                        value = (value + "-").Split('-')[0];

                        break;

                    case ViewControlType.Cbx:

                        value = (vi.ReleationInstance as ComboBox).SelectedValue;
                        if (value == null)
                        {
                            value = (vi.ReleationInstance as ComboBox).Text;
                        }

                        value = (value + "-").Split('-')[0];

                        break;

                    case ViewControlType.Dtp:
                        value = (vi.ReleationInstance as DateTimePicker).Value;

                        break;

                    case ViewControlType.Checkbox:
                        value = (vi.ReleationInstance as CheckBox).Checked;

                        break;

                    default:
                        break;
                    }


                    dataItem.Add(vi.InstanceName, value);
                }

                if (dataViewLayout1.HideBindDatas != null)
                {
                    foreach (KeyValuePair <string, object> kv in dataViewLayout1.HideBindDatas)
                    {
                        dataItem.Add(kv.Key, kv.Value);
                    }
                }

                resultDatas.Add(dataItem);

                return(resultDatas);

            default:
                return(null);
            }
        }
Beispiel #17
0
        public override IBizDataItems QueryDatas(string dataIdentificationName)
        {
            BizDataItems resultDatas = null;
            BizDataItem  dataItem    = null;

            string dataName = _provideDataDesc.FormatDataName(_moduleName, dataIdentificationName);

            switch (dataName)
            {
            case ImgDataDefine.CurrentImage:
                resultDatas = new BizDataItems();

                dataItem = new BizDataItem();

                if (_imageInfo == null)
                {
                    return(null);
                }

                dataItem.Add(DataHelper.StdPar_ApplyId, _applyId);
                dataItem.Add(DataHelper.StdPar_MediaId, _imageInfo.MediaId);
                dataItem.Add(DataHelper.StdPar_SerialId, _imageInfo.SerialId);
                dataItem.Add(DataHelper.StdPar_StorageId, _imageInfo.StorageId);
                dataItem.Add(DataHelper.StdPar_MediaOrder, _imageInfo.Order);
                dataItem.Add(DataHelper.StdPar_MediaType, _imageInfo.MediaType);
                dataItem.Add(DataHelper.StdPar_MediaName, _imageInfo.MediaName);
                dataItem.Add(DataHelper.StdPar_IsKeyImage, _imageInfo.IsKeyImage);
                dataItem.Add(DataHelper.StdPar_IsReportImage, _imageInfo.IsReportImage);
                dataItem.Add(DataHelper.StdPar_LocalFile, _imageInfo.File);
                dataItem.Add(DataHelper.StdPar_VPath, _imageInfo.VPath);


                resultDatas.Add(dataItem);

                return(resultDatas);

            default:
                return(null);
            }
        }