예제 #1
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public long Add(MobileSoft.Model.HSPR.Tb_HSPR_ParkingCarSignHand model)
 {
     return(dal.Add(model));
 }
예제 #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.HSPR.Tb_HSPR_ParkingCarSignHand model)
 {
     dal.Update(model);
 }
예제 #3
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <MobileSoft.Model.HSPR.Tb_HSPR_ParkingCarSignHand> DataTableToList(DataTable dt)
        {
            List <MobileSoft.Model.HSPR.Tb_HSPR_ParkingCarSignHand> modelList = new List <MobileSoft.Model.HSPR.Tb_HSPR_ParkingCarSignHand>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                MobileSoft.Model.HSPR.Tb_HSPR_ParkingCarSignHand model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.HSPR.Tb_HSPR_ParkingCarSignHand();
                    //model.CarSignID=dt.Rows[n]["CarSignID"].ToString();
                    if (dt.Rows[n]["CommID"].ToString() != "")
                    {
                        model.CommID = int.Parse(dt.Rows[n]["CommID"].ToString());
                    }
                    //model.CustID=dt.Rows[n]["CustID"].ToString();
                    //model.RoomID=dt.Rows[n]["RoomID"].ToString();
                    //model.ReceID=dt.Rows[n]["ReceID"].ToString();
                    //model.ParkID=dt.Rows[n]["ParkID"].ToString();
                    //model.HandID=dt.Rows[n]["HandID"].ToString();
                    //model.CostID=dt.Rows[n]["CostID"].ToString();
                    if (dt.Rows[n]["FeesStateDate"].ToString() != "")
                    {
                        model.FeesStateDate = DateTime.Parse(dt.Rows[n]["FeesStateDate"].ToString());
                    }
                    if (dt.Rows[n]["FeesEndDate"].ToString() != "")
                    {
                        model.FeesEndDate = DateTime.Parse(dt.Rows[n]["FeesEndDate"].ToString());
                    }
                    if (dt.Rows[n]["ChargeAmount"].ToString() != "")
                    {
                        model.ChargeAmount = decimal.Parse(dt.Rows[n]["ChargeAmount"].ToString());
                    }
                    model.SerialNum   = dt.Rows[n]["SerialNum"].ToString();
                    model.BarrierSign = dt.Rows[n]["BarrierSign"].ToString();
                    if (dt.Rows[n]["IsHisFees"].ToString() != "")
                    {
                        model.IsHisFees = int.Parse(dt.Rows[n]["IsHisFees"].ToString());
                    }
                    if (dt.Rows[n]["IsHand"].ToString() != "")
                    {
                        model.IsHand = int.Parse(dt.Rows[n]["IsHand"].ToString());
                    }
                    model.AcceptUserCode = dt.Rows[n]["AcceptUserCode"].ToString();
                    model.HandUserCode   = dt.Rows[n]["HandUserCode"].ToString();
                    if (dt.Rows[n]["HandDate"].ToString() != "")
                    {
                        model.HandDate = DateTime.Parse(dt.Rows[n]["HandDate"].ToString());
                    }
                    if (dt.Rows[n]["IsDelete"].ToString() != "")
                    {
                        model.IsDelete = int.Parse(dt.Rows[n]["IsDelete"].ToString());
                    }
                    if (dt.Rows[n]["SubmitDate"].ToString() != "")
                    {
                        model.SubmitDate = DateTime.Parse(dt.Rows[n]["SubmitDate"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }