/// <summary>
        /// 根据DataTable转换成List对象数组
        /// </summary>
        public List <MultiColorPen.Model.base_carseriesinfo> DataTableToList(DataTable dt)
        {
            List <MultiColorPen.Model.base_carseriesinfo> modelList = new List <MultiColorPen.Model.base_carseriesinfo>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                MultiColorPen.Model.base_carseriesinfo model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MultiColorPen.Model.base_carseriesinfo();
                    if (dt.Rows[n]["id"].ToString() != "")
                    {
                        model.id = int.Parse(dt.Rows[n]["id"].ToString());
                    }
                    model.brandcode  = dt.Rows[n]["brandcode"].ToString();
                    model.brandname  = dt.Rows[n]["brandname"].ToString();
                    model.seriescode = dt.Rows[n]["seriescode"].ToString();
                    model.seriesname = dt.Rows[n]["seriesname"].ToString();
                    if (dt.Rows[n]["isenable"].ToString() != "")
                    {
                        model.isenable = int.Parse(dt.Rows[n]["isenable"].ToString());
                    }
                    if (dt.Rows[n]["sort"].ToString() != "")
                    {
                        model.sort = int.Parse(dt.Rows[n]["sort"].ToString());
                    }
                    model.remark = dt.Rows[n]["remark"].ToString();
                    if (dt.Rows[n]["createtime"].ToString() != "")
                    {
                        model.createtime = DateTime.Parse(dt.Rows[n]["createtime"].ToString());
                    }
                    model.createman = dt.Rows[n]["createman"].ToString();
                    if (dt.Rows[n]["updatetime"].ToString() != "")
                    {
                        model.updatetime = DateTime.Parse(dt.Rows[n]["updatetime"].ToString());
                    }
                    model.updateman = dt.Rows[n]["updateman"].ToString();


                    modelList.Add(model);
                }
            }
            return(modelList);
        }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public int Update(MultiColorPen.Model.base_carseriesinfo model)
 {
     return(dal.Update(model) ? 1 : 0);
 }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(MultiColorPen.Model.base_carseriesinfo model)
 {
     return(dal.Add(model)?1:0);
 }