Exemplo n.º 1
0
 // 根据主键cityName返回指定的City实体
 public static CityBusEntity GetEntity(string cityName)
 {
     CityByPK exec = new CityByPK();
     exec.CityName = cityName;
     CityBusEntity obj = new CityBusEntity();
     obj.MetaDataTable = exec.ExecDataTable();
     return obj;
 }
Exemplo n.º 2
0
        // 根据主键cityName返回指定的City实体
        public static CityBusEntity GetEntity(string cityName)
        {
            CityByPK exec = new CityByPK();

            exec.CityName = cityName;
            CityBusEntity obj = new CityBusEntity();

            obj.MetaDataTable = exec.ExecDataTable();
            return(obj);
        }
Exemplo n.º 3
0
 // 公用静态方法,插入一条记录 InsertCity
 public static bool InsertEntity(CityBusEntity obj)
 {
     CityInsert exec = new CityInsert();
     try
     {
         exec.ReceiveParameter(obj);
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         obj = null;
     }
 }
Exemplo n.º 4
0
        // 公用静态方法,插入一条记录 InsertCity
        public static bool InsertEntity(CityBusEntity obj)
        {
            CityInsert exec = new CityInsert();

            try
            {
                exec.ReceiveParameter(obj);
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                obj = null;
            }
        }
Exemplo n.º 5
0
 // 公用静态方法,修改一条记录 UpdateCity
 public static bool UpdateEntity(CityBusEntity obj)
 {
     if (obj == null || obj.IsEmpty)
     {
         return false;
     }
     CityUpdate exec = new CityUpdate();
     try
     {
         exec.ReceiveParameter(obj);
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         obj = null;
     }
 }
Exemplo n.º 6
0
        // 公用静态方法,修改一条记录 UpdateCity
        public static bool UpdateEntity(CityBusEntity obj)
        {
            if (obj == null || obj.IsEmpty)
            {
                return(false);
            }
            CityUpdate exec = new CityUpdate();

            try
            {
                exec.ReceiveParameter(obj);
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                obj = null;
            }
        }
Exemplo n.º 7
0
 // 修改由实体指定的一条记录 ModifyCity
 public bool Modify(CityBusEntity obj)
 {
     return(UpdateEntity(obj));
 }
Exemplo n.º 8
0
 // 添加由实体指定的一条记录 AddCity
 public bool Add(CityBusEntity obj)
 {
     return(InsertEntity(obj));
 }
Exemplo n.º 9
0
 // 修改由实体指定的一条记录 ModifyCity
 public bool Modify(CityBusEntity obj)
 {
     return UpdateEntity(obj);
 }
Exemplo n.º 10
0
 // 添加由实体指定的一条记录 AddCity
 public bool Add(CityBusEntity obj)
 {
     return InsertEntity(obj);
 }