Ejemplo n.º 1
0
        public static JingShenModel GetJingShenModel(DbDataReader lineRoadDesignDR)
        {
            JingShenModel jsmodel = new JingShenModel();

            if (null != lineRoadDesignDR && lineRoadDesignDR.HasRows)
            {
                try
                {
                    while (lineRoadDesignDR.Read())
                    {
                        Type type = jsmodel.GetType();
                        foreach (PropertyInfo p in type.GetProperties())
                        {
                            string proName  = p.Name.Trim();
                            string proValue = lineRoadDesignDR[proName].ToString().Trim();

                            type.GetProperty(proName).SetValue(jsmodel, proValue, null);
                        }
                    }
                }
                catch
                {
                    lineRoadDesignDR.Close();
                }
                lineRoadDesignDR.Close();
            }

            return(jsmodel);
        }
Ejemplo n.º 2
0
        }                                    //间隔多少主刻度标注一次;例如,每两个主刻度标注一次;

        public JingShenDesignClass(JingShenModel jingShenModel)
        {
            ID                = jingShenModel.ID.Trim();
            MainKDLength      = StrUtil.StrToDouble(jingShenModel.MainKDLength, 5, "井深的主刻度设计为非数值型");
            MainKDSpace       = StrUtil.StrToInt(jingShenModel.MainKDSpace, 5, "井深主刻度间隔设计为非数值型");
            BZTxtHeigh        = StrUtil.StrToDouble(jingShenModel.BZTxtHeigh, 2, "井深刻度标注文字高度为非数值型");
            BZTxtFont         = jingShenModel.BZTxtFont;
            isLeftMainKDShow  = BoolUtil.GetBoolByBindID(jingShenModel.isLeftMainKDShow, true);   // BoolUtil.GetBoolBySFStr(jingShenModel.isLeftMainKDShow,false);
            isRightMainKDShow = BoolUtil.GetBoolByBindID(jingShenModel.isRightMainKDShow, false); // BoolUtil.GetBoolBySFStr(jingShenModel.isRightMainKDShow,false);
            BiaoZhuSpace      = 1;
        }