/// <summary>
 /// 执行插入人员信息方法
 /// </summary>
 /// <param name="obj"></param>
 /// <returns>影响行数</returns>
 public int Insert(area_info obj)
 {
     try
     {
         string sql = "insert into fimp.area_info(area_name_en,area_name_tw,area_name_cn,time_zone )values('{0}','{1}','{2}',{3})";
         sql = string.Format(sql, obj.area_name_en, obj.area_name_tw, obj.area_name_cn, obj.time_zone);
         int count = PostgreHelper.ExecuteNonQuery(sql);
         return(count);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 /// <summary>
 /// 更新信息
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public int Update(area_info obj)
 {
     try
     {
         int    count = 0;
         string sql   = "update fimp.area_info set area_name_en='{0}',area_name_tw='{1}',area_name_cn='{2}',time_zone='{3}' where area_id={4}";
         sql   = string.Format(sql, obj.area_name_en, obj.area_name_tw, obj.area_name_cn, obj.time_zone, obj.area_id);
         count = PostgreHelper.ExecuteNonQuery(sql);
         return(count);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public area_info SelectSingleID(int area_id)
 {
     try
     {
         area_info obj = new area_info();
         string    sql = "select * from fimp.area_info where area_id={0}";
         sql = string.Format(sql, area_id);
         obj = PostgreHelper.GetSingleEntity <area_info>(sql);
         return(obj);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 4
0
        public int Update(area_info obj)
        {
            int count = AIS.Update(obj);

            return(count);
        }
Exemplo n.º 5
0
        public int Insert(area_info obj)
        {
            int count = AIS.Insert(obj);

            return(count);
        }
Exemplo n.º 6
0
        public area_info SelectSingleID(int id)
        {
            area_info obj = AIS.SelectSingleID(id);

            return(obj);
        }