Beispiel #1
0
        /// <summary>
        /// 根据文档类型,查询文档的扩展属性
        /// </summary>
        /// <returns></returns>
        public document_type getDocumentProperty(document doc)
        {
            document_type doctype = new document_type();
            List<doc_attached_property> docProList = new List<doc_attached_property>();
            doc_attached_property dp1 = new doc_attached_property();
            dp1.en_name = "Docdep";
            dp1.cn_name = "文档部门";
            dp1.is_user_define = "";
            dp1.is_display = true;
            dp1.display_width = "100";
            dp1.input_type = "";
            dp1.data_type = "字符型";
            dp1.default_value = "测试001";
            dp1.data_length = "100";
            dp1.order = "1";
            docProList.Add(dp1);
            doc_attached_property dp2 = new doc_attached_property();
            dp2.en_name = "wordsize";
            dp2.cn_name = "文档大小";
            dp2.is_user_define = "";
            dp2.is_display = false;
            dp2.display_width = "100";
            dp2.data_type = "数值型";
            dp2.default_value = "测试002";
            dp2.data_length = "80";
            dp2.order = "2";
            docProList.Add(dp2);
            doc_attached_property dp3 = new doc_attached_property();
            dp3.en_name = "wordsize";
            dp3.cn_name = "文档大小";
            dp3.is_user_define = "";
            dp3.is_display = true;
            dp3.display_width = "100";
            dp3.data_type = "数值型";
            dp3.default_value = "测试002";
            dp3.data_length = "80";
            dp3.order = "2";
            docProList.Add(dp3);
            doc_attached_property dp4 = new doc_attached_property();
            dp4.en_name = "column4";
            dp4.cn_name = "文档扩展属性1";
            dp4.is_user_define = "是";
            dp4.is_display = true;
            dp4.display_width = "100";
            dp4.order = "4";
            dp4.input_type = "SEL";

            List<doc_combobox_value> selectvlaue = new List<doc_combobox_value>();
            doc_combobox_value v1 = new doc_combobox_value();
            v1.value = "1000";
            doc_combobox_value v2 = new doc_combobox_value();
            v2.value = "2000";
            selectvlaue.Add(v1);
            selectvlaue.Add(v2);
            dp4.ComboxValue = selectvlaue;
            docProList.Add(dp4);
            doctype.DocProperty = docProList;
            return doctype;
        }
Beispiel #2
0
        /// <summary>
        /// 根据文档属性来查询文档属性
        /// </summary>
        /// <param name="docType"></param>
        /// <returns></returns>
        public document_type getDocumentColumnByType(document_type docType)
        {
            //根据文档类型,查找文档的属性
            document_type type = new document_type();
            doc_attached_property p1 = new doc_attached_property();
            p1.cn_name = "";
            p1.en_name = "";

            return type;
        }
Beispiel #3
0
 /// <summary>
 /// 保存按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         document_type docType = new document_type();
         docType.DocProperty = list;
         // 把集合保存到数据库中
         bool flag = WcfServiceLocator.Create<IDocPropertyBuild>().insertDocProperty(docType);
         if (flag)
         {
             MessageBox.Show("保存成功!");
         }
         else
         {
             MessageBox.Show("保存失败");
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Beispiel #4
0
 /// <summary>
 /// 插入文档属性
 /// </summary>
 /// <param name="docType"></param>
 /// <returns></returns>
 public bool insertDocProperty(document_type docType)
 {
     // 根据docType中属性集合,插入更新到数据库。
     return true;
 }