Exemplo n.º 1
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public TF.RunSafty.Model.WorkShop DataRowToModel(DataRow row)
        {
            TF.RunSafty.Model.WorkShop model = new TF.RunSafty.Model.WorkShop();
            if (row != null)
            {
                if (row["strAreaGUID"] != null)
                {
                    model.strAreaGUID = row["strAreaGUID"].ToString();
                }
                if (row["strWorkShopGUID"] != null)
                {
                    model.strWorkShopGUID = row["strWorkShopGUID"].ToString();
                }
                if (row["strWorkShopName"] != null)
                {
                    model.strWorkShopName = row["strWorkShopName"].ToString();
                }

                if (row["strWorkShopNumber"] != null)
                {
                    model.strWorkShopNumber = row["strWorkShopNumber"].ToString();
                }
            }
            return(model);
        }
Exemplo n.º 2
0
 public List <TF.RunSafty.Model.WorkShop> GetPlaceList(List <TF.RunSafty.Model.WorkShop> placeList)
 {
     if (placeList != null)
     {
         List <TF.RunSafty.Model.WorkShop> resultList = new List <TF.RunSafty.Model.WorkShop>();
         foreach (TF.RunSafty.Model.WorkShop place in placeList)
         {
             TF.RunSafty.Model.WorkShop model = new TF.RunSafty.Model.WorkShop();
             model.strAreaGUID       = place.strAreaGUID;
             model.strWorkShopGUID   = place.strWorkShopGUID;
             model.strWorkShopName   = place.strWorkShopName;
             model.strWorkShopNumber = place.strWorkShopNumber;
             resultList.Add(model);
         }
         return(resultList);
     }
     return(null);
 }