Beispiel #1
0
        public DutyPlace GetAllPlace_DRToModelDTToList(DataRow dr)
        {
            DutyPlace model = new DutyPlace();

            if (dr != null)
            {
                model.placeID   = ObjectConvertClass.static_ext_string(dr["strPlaceID"]);
                model.placeName = ObjectConvertClass.static_ext_string(dr["strPlaceName"]);
            }
            return(model);
        }
Beispiel #2
0
        public DutyPlace GetSitePlace(string siteId)
        {
            DutyPlace     result = null;
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select top 1 * from VIEW_Base_Site_DutyPlace");
            DataTable dt = SqlHelper.ExecuteDataset(SqlHelper.ConnString, CommandType.Text, strSql.ToString()).Tables[0];

            if (dt.Rows.Count > 0)
            {
                result = GetAllPlace_DRToModelDTToList(dt.Rows[0]);
            }

            return(result);
        }
Beispiel #3
0
 private DutyPlaceList GetPlaceListOfClient(List <TF.RunSafty.Model.VIEW_Base_Site_DutyPlace> placeList)
 {
     if (placeList != null)
     {
         DutyPlaceList resultList = new DutyPlaceList();
         foreach (TF.RunSafty.Model.VIEW_Base_Site_DutyPlace place in placeList)
         {
             DutyPlace model = new DutyPlace();
             model.placeID   = place.strPlaceID;
             model.placeName = place.strPlaceName;
             resultList.Add(model);
         }
         return(resultList);
     }
     return(null);
 }