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

            if (rowsCount > 0)
            {
                MobileSoft.Model.Sys.Tb_Sys_TakePicRoomState model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.Sys.Tb_Sys_TakePicRoomState();
                    //model.StatID=dt.Rows[n]["StatID"].ToString();
                    if (dt.Rows[n]["StatType"].ToString() != "")
                    {
                        model.StatType = int.Parse(dt.Rows[n]["StatType"].ToString());
                    }
                    if (dt.Rows[n]["CommID"].ToString() != "")
                    {
                        model.CommID = int.Parse(dt.Rows[n]["CommID"].ToString());
                    }
                    model.OrganCode = dt.Rows[n]["OrganCode"].ToString();
                    if (dt.Rows[n]["StatDate"].ToString() != "")
                    {
                        model.StatDate = DateTime.Parse(dt.Rows[n]["StatDate"].ToString());
                    }
                    if (dt.Rows[n]["RoomState"].ToString() != "")
                    {
                        model.RoomState = int.Parse(dt.Rows[n]["RoomState"].ToString());
                    }
                    if (dt.Rows[n]["Counts"].ToString() != "")
                    {
                        model.Counts = int.Parse(dt.Rows[n]["Counts"].ToString());
                    }
                    if (dt.Rows[n]["Counts0"].ToString() != "")
                    {
                        model.Counts0 = int.Parse(dt.Rows[n]["Counts0"].ToString());
                    }
                    if (dt.Rows[n]["Counts1"].ToString() != "")
                    {
                        model.Counts1 = int.Parse(dt.Rows[n]["Counts1"].ToString());
                    }
                    if (dt.Rows[n]["Counts2"].ToString() != "")
                    {
                        model.Counts2 = int.Parse(dt.Rows[n]["Counts2"].ToString());
                    }
                    if (dt.Rows[n]["Counts3"].ToString() != "")
                    {
                        model.Counts3 = int.Parse(dt.Rows[n]["Counts3"].ToString());
                    }
                    if (dt.Rows[n]["Counts4"].ToString() != "")
                    {
                        model.Counts4 = int.Parse(dt.Rows[n]["Counts4"].ToString());
                    }
                    if (dt.Rows[n]["Counts5"].ToString() != "")
                    {
                        model.Counts5 = int.Parse(dt.Rows[n]["Counts5"].ToString());
                    }
                    if (dt.Rows[n]["Counts6"].ToString() != "")
                    {
                        model.Counts6 = int.Parse(dt.Rows[n]["Counts6"].ToString());
                    }
                    if (dt.Rows[n]["Counts7"].ToString() != "")
                    {
                        model.Counts7 = int.Parse(dt.Rows[n]["Counts7"].ToString());
                    }
                    if (dt.Rows[n]["Counts8"].ToString() != "")
                    {
                        model.Counts8 = int.Parse(dt.Rows[n]["Counts8"].ToString());
                    }
                    if (dt.Rows[n]["Area"].ToString() != "")
                    {
                        model.Area = decimal.Parse(dt.Rows[n]["Area"].ToString());
                    }
                    if (dt.Rows[n]["Area0"].ToString() != "")
                    {
                        model.Area0 = decimal.Parse(dt.Rows[n]["Area0"].ToString());
                    }
                    if (dt.Rows[n]["Area1"].ToString() != "")
                    {
                        model.Area1 = decimal.Parse(dt.Rows[n]["Area1"].ToString());
                    }
                    if (dt.Rows[n]["Area2"].ToString() != "")
                    {
                        model.Area2 = decimal.Parse(dt.Rows[n]["Area2"].ToString());
                    }
                    if (dt.Rows[n]["Area3"].ToString() != "")
                    {
                        model.Area3 = decimal.Parse(dt.Rows[n]["Area3"].ToString());
                    }
                    if (dt.Rows[n]["Area4"].ToString() != "")
                    {
                        model.Area4 = decimal.Parse(dt.Rows[n]["Area4"].ToString());
                    }
                    if (dt.Rows[n]["Area5"].ToString() != "")
                    {
                        model.Area5 = decimal.Parse(dt.Rows[n]["Area5"].ToString());
                    }
                    if (dt.Rows[n]["Area6"].ToString() != "")
                    {
                        model.Area6 = decimal.Parse(dt.Rows[n]["Area6"].ToString());
                    }
                    if (dt.Rows[n]["Area7"].ToString() != "")
                    {
                        model.Area7 = decimal.Parse(dt.Rows[n]["Area7"].ToString());
                    }
                    if (dt.Rows[n]["Area8"].ToString() != "")
                    {
                        model.Area8 = decimal.Parse(dt.Rows[n]["Area8"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }