コード例 #1
0
        /// <summary>
        /// 获取重整标记行对应的OrdPrintDO对象
        /// </summary>
        /// <param name="ordPrintDataDTO">第一条待打印数据,用来完善重整标记行数据</param>
        /// <returns></returns>
        private OrdPrintDO getOrdPrintDOReset(OrdPrintDataDTO ordPrintDataDTO)
        {
            OrdPrintDO ordPrintDO = new OrdPrintDO();

            BeanUtils.CopyProerties(ordPrintDataDTO, ordPrintDO, propertiesReset);

            ordPrintDO.Fg_reformrow   = true;
            ordPrintDO.Content_or_prn = cfgViewModel.GetResetRowContent(true);
            return(ordPrintDO);
        }
コード例 #2
0
        public AnnotationProcessorOptions GetAnnotationOptions()
        {
            var result = new AnnotationProcessorOptions();

            BeanUtils.CopyPropeties(this, result);
            result.IsPileup  = true;
            result.InputFile = FilterResultFile;

            return(result);
        }
コード例 #3
0
ファイル: JsonReport.cs プロジェクト: wukele/exreport
        public static string[] convert(object[] arrays, string[] properties)
        {
            if (arrays == null || arrays.Length == 0)
            {
                return(null);
            }

            string[]        array   = new string[properties.Length];
            StringBuilder[] arraysb = new StringBuilder[properties.Length];

            string value = null;

            for (int i = 0; i < arrays.Length; i++)
            {
                object dto = arrays[i];
                for (int j = 0; j < properties.Length; j++)
                {
                    try
                    {
                        object o = BeanUtils.getProperty(dto, properties[j]);
                        value = (o == null) ? "" : o.ToString();

                        if (value == null)
                        {
                            value = "";
                        }

                        value = value.Replace(',', ' ');

                        if (i == 0)
                        {
                            arraysb[j] = new StringBuilder();
                            arraysb[j].Append(value);
                        }
                        else
                        {
                            arraysb[j].Append(JAF_SIGNAL);
                            arraysb[j].Append(value);
                        }
                    }
                    catch (Exception e)
                    {
                    }
                }
            }

            for (int j = 0; j < properties.Length; j++)
            {
                array[j] = arraysb[j].ToString().Replace("\r\n", "");
            }

            return(array);
        }
コード例 #4
0
        public override FilterProcessorOptions GetFilterOptions()
        {
            var result = new FilterProcessorOptions();

            BeanUtils.CopyPropeties(this, result);

            result.Config     = Config;
            result.IsPileup   = true;
            result.InputFile  = BaseFilename;
            result.OutputFile = FilterResultFile;

            return(result);
        }
コード例 #5
0
        public virtual void Edit(TModel model)
        {
            _connection.Open();
            PreEdit(model);
            TDTO dto = BeanUtils.CreateAndCopy <TDTO>(model);

            SqlCommand command = GetUpdateCommand(dto);

            command.ExecuteNonQuery();
            command.Dispose();

            _connection.Close();
            PostInsert(model, dto);
        }
コード例 #6
0
        public override FilterProcessorOptions GetFilterOptions()
        {
            var result = new FilterProcessorOptions();

            BeanUtils.CopyPropeties(this, result);

            result.Config       = Config;
            result.IsPileup     = false;
            result.IsValidation = true;
            result.InputFile    = BaseFilename;
            result.OutputFile   = GetLinuxFile(OutputSuffix + ".r.tsv");

            return(result);
        }
コード例 #7
0
 public void ShowBeans()
 {
     try
     {
         String sWebRoot = tbWebRoot.Text;
         Dictionary <String, XmlNode> dBeans = BeanUtils.getAllBeans_RecursiveSearch(sWebRoot);
         var sbSpringBeans = new SpringBeans(dBeans);
         showSpringBeansInDataGrdView(sbSpringBeans);
     }
     catch (Exception ex)
     {
         DI.log.ex(ex);
     }
 }
コード例 #8
0
        /// <summary>
        /// TestCase BeanUtils
        /// </summary>
        /// <param name="args">The command-line arguments.</param>
        public static void Main(string[] args)
        {
            Student stu = new Student();

            stu.Name    = "Giraffe";
            stu.Company = "ABC";
            stu._school = "HEBUT";

            Student stu1 = BeanUtils.CloneBean <Student>(stu, new object[1] {
                "BeiDa"
            });

            Console.WriteLine(stu1.ToString());

            BeanUtils.CopyProperty(stu1, "Company", "H3C");
            Console.WriteLine(stu1.ToString());

            Student stu2 = new Student();

            BeanUtils.CopyPorperties(stu1, stu2);
            Console.WriteLine(stu2.ToString());

            Dictionary <string, object> dic = BeanUtils.Describe(stu2);

            foreach (var item in dic)
            {
                Console.WriteLine("----" + item.Key + "----" + item.Value + "----");
            }

            Dictionary <string, Object> dictionary = new Dictionary <string, object>();

            dictionary.Add("Name", "zbmcz");
            dictionary.Add("Company", "alibaba");
            dictionary.Add("school", "zhejiangdaxue");
            Student stu3 = new Student();

            BeanUtils.populate(stu3, dictionary);
            Console.WriteLine(stu3);

            Student stu4 = BeanUtils.CopyPorperties <Student>(stu3);

            Console.WriteLine(stu4);

            Console.ReadKey();
        }
コード例 #9
0
        /// <summary>
        /// 将医嘱待打印数据对象转换为医嘱打印的数据对象
        /// </summary>
        /// <param name="ordDataDTO">医嘱待打印数据对象</param>
        /// <returns>医嘱打印的数据对象</returns>
        private OrdPrintDO convertOrdPrintData(OrdPrintDataDTO ordDataDTO, bool isSubOr)
        {
            OrdPrintDO ordPrintDO = new OrdPrintDO();

            // 格式好医嘱内容
            this.setOrdPrintContent(ordDataDTO, isSubOr);

            // 属性复制是先排除医生、核对护士签字
            // 进行属性拷贝
            string[] properties = new string[propertiesSign.Length + propertiesSignStop.Length];
            propertiesSign.CopyTo(properties, 0);
            propertiesSignStop.CopyTo(properties, propertiesSign.Length);
            BeanUtils.CopyProerties(ordDataDTO, ordPrintDO, properties);

            // 设置生效日期,停止日期,医生护士签字
            this.setOrdPrintDatetime(ordDataDTO, ordPrintDO);

            return(ordPrintDO);
        }
コード例 #10
0
        protected virtual TModel GetModelByReader(ref SqlDataReader reader)
        {
            TDTO dto = new TDTO();

            var props = GetSelectProp();

            object[] os = new object[props.Count];

            foreach (var prop in props)
            {
                object o = reader[prop.Name];
                if (o == null || o is DBNull)
                {
                    continue;
                }
                prop.SetValue(dto, o);
            }
            TModel model = BeanUtils.CreateAndCopy <TModel>(dto);

            return(model);
        }
コード例 #11
0
        /// <summary>
        /// 设置医嘱生效时间、停止时间
        /// </summary>
        /// <param name="ordDataDTO"></param>
        /// <param name="ordPrintDO"></param>
        private void setOrdPrintDatetime(OrdPrintDataDTO ordDataDTO, OrdPrintDO ordPrintDO)
        {
            // 设置医嘱的生效时间
            FDateTime dtEffe = ordPrintDO.Dt_effe;

            if (dtEffe != null)
            {
                DateTime dateTime = dtEffe.ToTarget;
                ordPrintDO.Dt_effe_m = dateTime.Month.ToString();
                ordPrintDO.Dt_effe_d = dateTime.Day.ToString();
                ordPrintDO.Dt_effe_t = dateTime.TimeOfDay.ToString();
            }

            // 判断是否需要打印签字人(签署医生、核对护士)
            if (cfgViewModel.IsPrintSignatory())
            {
                BeanUtils.SetProerties(ordDataDTO, ordPrintDO, propertiesSign);
            }

            // 当停止核对结束后打印停止时间
            if (ordPrintDO.Fg_chk_stop == FBoolean.True)
            {
                // 设置医嘱的停止时间
                ordPrintDO.Dt_end = ordDataDTO.Dt_end;
                FDateTime dtEnd    = ordPrintDO.Dt_end;
                DateTime  dateTime = dtEnd.ToTarget;

                ordPrintDO.Dt_end_m = dateTime.Month.ToString();
                ordPrintDO.Dt_end_d = dateTime.Day.ToString();
                ordPrintDO.Dt_end_t = dateTime.TimeOfDay.ToString();

                // 判断是否需要打印签字人(停止医生、停止核对护士)
                if (cfgViewModel.IsPrintSignatory())
                {
                    BeanUtils.SetProerties(ordDataDTO, ordPrintDO, propertiesSignStop);
                }
            }
        }