示例#1
0
 public UClableText(InCommonNoteItemEntity inCommonNoteItem)
 {
     InitializeComponent();
     m_inCommonNoteItem = inCommonNoteItem;
     label1.Text        = m_inCommonNoteItem.DataElementName + ":";
     textEdit1.Text     = inCommonNoteItem.OtherName;
 }
示例#2
0
 public UCRichEdit(InCommonNoteItemEntity inCommonNoteItemEntity)
 {
     InitializeComponent();
     if (string.IsNullOrEmpty(this.inCommonNoteItemEntity.OtherName))
     {
         lblName.Text = "未指定列:";
     }
     else
     {
         lblName.Text = this.inCommonNoteItemEntity.OtherName + ":";
     }
 }
示例#3
0
        /// <summary>
        /// 保存项目 直接在对象的xml之中
        /// </summary>
        public bool GetInCommonNoteItemSave(ref string message)
        {
            if (this.inCommonNoteItemEntity.IsValidate == "否")
            {
                this.inCommonNoteItemEntity.ValueXml = InCommonNoteItemEntity.ConvertStrToXml(txtValue.Text);
            }
            else
            {
                string elementType = this.inCommonNoteItemEntity.DataElement.ElementType;
                switch (elementType)
                {
                case "S1":
                    this.inCommonNoteItemEntity.ValueXml = InCommonNoteItemEntity.ConvertStrToXml(txtValue.Text);
                    break;

                case "S2":
                    string strText = cboS2S3.Text;
                    this.inCommonNoteItemEntity.ValueXml = InCommonNoteItemEntity.ConvertStrToXml(strText);
                    //选中时赋值的
                    break;

                case "S3":
                    string strTextS3 = cboS2S3.Text;
                    this.inCommonNoteItemEntity.ValueXml = InCommonNoteItemEntity.ConvertStrToXml(strTextS3);
                    //选中时赋值的
                    break;

                case "S4":
                    this.inCommonNoteItemEntity.ValueXml = InCommonNoteItemEntity.ConvertStrToXml(txtValue.Text);
                    break;

                case "S9":
                    List <BaseDictory> baseDictoryList = new List <BaseDictory>();
                    foreach (CheckedListBoxItem item in chkListValue.Items)
                    {
                        if (item.CheckState == CheckState.Checked)
                        {
                            baseDictoryList.Add(item.Value as BaseDictory);
                        }
                    }
                    this.inCommonNoteItemEntity.BaseValueList = baseDictoryList;
                    this.inCommonNoteItemEntity.ValueXml      = InCommonNoteItemEntity.ConvertBaseToXml(baseDictoryList);
                    //选中时赋值的
                    break;

                case "L":
                    BaseDictory basedicL = new BaseDictory();
                    basedicL.Id   = chboxValue.Checked == true ? "1" : "0";
                    basedicL.Name = chboxValue.Checked == true ? "是" : "否";
                    this.inCommonNoteItemEntity.ValueXml = InCommonNoteItemEntity.ConvertBaseToXml(basedicL);
                    break;

                case "N":
                    this.inCommonNoteItemEntity.ValueXml = InCommonNoteItemEntity.ConvertStrToXml(spinEditValue.Value.ToString());
                    break;

                case "D":
                    string dateV10 = DateUtil.getDateTime(dateEditValue.DateTime.ToString(), DateUtil.NORMAL_SHORT);
                    if (dateV10 == "0001-01-01")
                    {
                        dateV10 = "";
                    }
                    this.inCommonNoteItemEntity.ValueXml = InCommonNoteItemEntity.ConvertStrToXml(dateV10);
                    break;

                case "DT":
                    string dateV19 = DateUtil.getDateTime(dateEditValue.DateTime.ToString(), DateUtil.NORMAL_LONG);
                    if (dateV19 == "0001-01-01 00:00:00")
                    {
                        dateV19 = "";
                    }
                    this.inCommonNoteItemEntity.ValueXml = InCommonNoteItemEntity.ConvertStrToXml(dateV19);
                    break;

                case "T":
                    string dateV8 = DateUtil.getDateTime(timeEditValue.Time.ToString(), DateUtil.NORMAL_LONG).Substring(11, 8);
                    if (dateV8 == "00:00:00")
                    {
                        dateV8 = "";
                    }
                    this.inCommonNoteItemEntity.ValueXml = InCommonNoteItemEntity.ConvertStrToXml(dateV8);
                    break;

                default:
                    this.inCommonNoteItemEntity.ValueXml = InCommonNoteItemEntity.ConvertStrToXml(txtValue.Text);
                    break;
                }
            }
            return(true);
        }
示例#4
0
 //加载数据
 public void InitDate(InCommonNoteItemEntity inCommonNoteItemEntity, IEmrHost app)
 {
     this.inCommonNoteItemEntity = inCommonNoteItemEntity;
     InitDate();
 }
示例#5
0
 public ucLabText(InCommonNoteItemEntity inCommonNoteItemEntity)
 {
     this.inCommonNoteItemEntity = inCommonNoteItemEntity;
     InitializeComponent();
     InitDate();
 }