Exemplo n.º 1
0
 /// <summary>
 /// 执行插入人员信息方法
 /// </summary>
 /// <param name="obj"></param>
 /// <returns>影响行数</returns>
 public int Insert(material_category obj)
 {
     try
     {
         string sql = "insert into fimp.material_category(type_code,type_name,unit_no,line_id,remark,createtime)values('{0}','{1}','{2}',{3},'{4}','{5}')";
         sql = string.Format(sql, obj.type_code, obj.type_name, obj.unit_no, obj.line_id, obj.remark, DateTime.Now.AddHours(GlobalDefine.SysTimeZone));
         int count = PostgreHelper.ExecuteNonQuery(sql);
         return(count);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 更新信息
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public int Update(material_category obj)
 {
     try
     {
         int    count = 0;
         string sql   = "update fimp.material_category set type_code='{0}',type_name='{1}',unit_no='{2}',line_id={3},remark='{4}',createtime='{5}' where id={6}";
         sql   = string.Format(sql, obj.type_code, obj.type_name, obj.unit_no, obj.line_id, obj.remark, DateTime.Now.AddHours(GlobalDefine.SysTimeZone), obj.id);
         count = PostgreHelper.ExecuteNonQuery(sql);
         return(count);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 3
0
 public material_category SelectSingleID(int area_id)
 {
     try
     {
         material_category obj = new material_category();
         string            sql = "select * from fimp.material_category where id={0}";
         sql = string.Format(sql, area_id);
         obj = PostgreHelper.GetSingleEntity <material_category>(sql);
         return(obj);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 4
0
        public int Update(material_category obj)
        {
            int count = AIS.Update(obj);

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

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

            return(obj);
        }