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

            if (rowsCount > 0)
            {
                MobileSoft.Model.Sys.Tb_Sys_TakePicWork model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.Sys.Tb_Sys_TakePicWork();
                    //model.StatID=dt.Rows[n]["StatID"].ToString();
                    model.UserCode = dt.Rows[n]["UserCode"].ToString();
                    if (dt.Rows[n]["InsBatchFeesCount"].ToString() != "")
                    {
                        model.InsBatchFeesCount = int.Parse(dt.Rows[n]["InsBatchFeesCount"].ToString());
                    }
                    if (dt.Rows[n]["InsOneFeesCount"].ToString() != "")
                    {
                        model.InsOneFeesCount = int.Parse(dt.Rows[n]["InsOneFeesCount"].ToString());
                    }
                    if (dt.Rows[n]["OffsetPrecCount"].ToString() != "")
                    {
                        model.OffsetPrecCount = int.Parse(dt.Rows[n]["OffsetPrecCount"].ToString());
                    }
                    if (dt.Rows[n]["WaivCount"].ToString() != "")
                    {
                        model.WaivCount = int.Parse(dt.Rows[n]["WaivCount"].ToString());
                    }
                    if (dt.Rows[n]["ReceCount"].ToString() != "")
                    {
                        model.ReceCount = int.Parse(dt.Rows[n]["ReceCount"].ToString());
                    }
                    if (dt.Rows[n]["RefundCount"].ToString() != "")
                    {
                        model.RefundCount = int.Parse(dt.Rows[n]["RefundCount"].ToString());
                    }
                    if (dt.Rows[n]["PrecRefundCount"].ToString() != "")
                    {
                        model.PrecRefundCount = int.Parse(dt.Rows[n]["PrecRefundCount"].ToString());
                    }
                    if (dt.Rows[n]["LeaseContCount"].ToString() != "")
                    {
                        model.LeaseContCount = int.Parse(dt.Rows[n]["LeaseContCount"].ToString());
                    }
                    if (dt.Rows[n]["ContCount"].ToString() != "")
                    {
                        model.ContCount = int.Parse(dt.Rows[n]["ContCount"].ToString());
                    }
                    if (dt.Rows[n]["RoomStateCount"].ToString() != "")
                    {
                        model.RoomStateCount = int.Parse(dt.Rows[n]["RoomStateCount"].ToString());
                    }
                    if (dt.Rows[n]["AskForCount"].ToString() != "")
                    {
                        model.AskForCount = int.Parse(dt.Rows[n]["AskForCount"].ToString());
                    }
                    if (dt.Rows[n]["PurchaseCount"].ToString() != "")
                    {
                        model.PurchaseCount = int.Parse(dt.Rows[n]["PurchaseCount"].ToString());
                    }
                    if (dt.Rows[n]["InCount"].ToString() != "")
                    {
                        model.InCount = int.Parse(dt.Rows[n]["InCount"].ToString());
                    }
                    if (dt.Rows[n]["OutCount"].ToString() != "")
                    {
                        model.OutCount = int.Parse(dt.Rows[n]["OutCount"].ToString());
                    }
                    if (dt.Rows[n]["InventCount"].ToString() != "")
                    {
                        model.InventCount = int.Parse(dt.Rows[n]["InventCount"].ToString());
                    }
                    if (dt.Rows[n]["MaterialTracCount"].ToString() != "")
                    {
                        model.MaterialTracCount = int.Parse(dt.Rows[n]["MaterialTracCount"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }