/// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(Hownet.Model.ShippingNoticeInfo model)
 {
     return(dal.Add(model));
 }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(Hownet.Model.ShippingNoticeInfo model)
 {
     dal.Update(model);
 }
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Hownet.Model.ShippingNoticeInfo> DataTableToList(DataTable dt)
        {
            List <Hownet.Model.ShippingNoticeInfo> modelList = new List <Hownet.Model.ShippingNoticeInfo>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                Hownet.Model.ShippingNoticeInfo model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Hownet.Model.ShippingNoticeInfo();
                    if (dt.Rows[n]["ID"].ToString() != "")
                    {
                        model.ID = int.Parse(dt.Rows[n]["ID"].ToString());
                    }
                    else
                    {
                        model.ID = 0;
                    }
                    if (dt.Rows[n]["MainID"].ToString() != "")
                    {
                        model.MainID = int.Parse(dt.Rows[n]["MainID"].ToString());
                    }
                    else
                    {
                        model.MainID = 0;
                    }
                    if (dt.Rows[n]["CompanyID"].ToString() != "")
                    {
                        model.CompanyID = int.Parse(dt.Rows[n]["CompanyID"].ToString());
                    }
                    else
                    {
                        model.CompanyID = 0;
                    }
                    if (dt.Rows[n]["MaterielID"].ToString() != "")
                    {
                        model.MaterielID = int.Parse(dt.Rows[n]["MaterielID"].ToString());
                    }
                    else
                    {
                        model.MaterielID = 0;
                    }
                    if (dt.Rows[n]["BrandID"].ToString() != "")
                    {
                        model.BrandID = int.Parse(dt.Rows[n]["BrandID"].ToString());
                    }
                    else
                    {
                        model.BrandID = 0;
                    }
                    if (dt.Rows[n]["Amount"].ToString() != "")
                    {
                        model.Amount = int.Parse(dt.Rows[n]["Amount"].ToString());
                    }
                    else
                    {
                        model.Amount = 0;
                    }
                    if (dt.Rows[n]["MeasureID"].ToString() != "")
                    {
                        model.MeasureID = int.Parse(dt.Rows[n]["MeasureID"].ToString());
                    }
                    else
                    {
                        model.MeasureID = 0;
                    }
                    model.OnePackaging = dt.Rows[n]["OnePackaging"].ToString();
                    model.TwoPackaging = dt.Rows[n]["TwoPackaging"].ToString();
                    if (dt.Rows[n]["LastTime"].ToString() != "")
                    {
                        model.LastTime = DateTime.Parse(dt.Rows[n]["LastTime"].ToString());
                    }
                    else
                    {
                        model.LastTime = DateTime.Parse("1900-1-1");
                    }
                    model.Remark = dt.Rows[n]["Remark"].ToString();
                    model.A      = int.Parse(dt.Rows[n]["A"].ToString());
                    modelList.Add(model);
                }
            }
            return(modelList);
        }