/// <summary> /// 执行插入人员信息方法 /// </summary> /// <param user_name="obj"></param> /// <returns>影响行数</returns> public int Insert(person obj) { try { int count = PostgreHelper.InsertSingleEntity <person>(obj); return(count); } catch (Exception ex) { throw ex; } }
//插入数据 public int Insert(unit_info obj) { try { int count = PostgreHelper.InsertSingleEntity <unit_info>(obj); return(count); } catch (Exception ex) { throw ex; } }
/// <summary> /// 插入C/T日志 /// </summary> /// <param name="obj"></param> /// <returns></returns> public int Insert(CT_Log obj) { try { int id = PostgreHelper.InsertSingleEntity <CT_Log>(obj); return(id); } catch (Exception ex) { throw ex; } }
/// <summary> /// 插入 /// </summary> /// <param name="obj"></param> /// <returns></returns> public int Insert(Material obj) { try { int count = PostgreHelper.InsertSingleEntity <Material>("jinchen.material_info", obj); return(count); } catch (Exception ex) { throw ex; } }
/// <summary> /// 插入 /// </summary> /// <param name="obj"></param> /// <returns></returns> public int Insert(CtAveraged obj) { try { int id = PostgreHelper.InsertSingleEntity <CtAveraged>(obj); return(id); } catch (Exception ex) { } return(-1); }
/// <summary> /// 插入C/T /// </summary> /// <param name="obj"></param> /// <returns></returns> public int Insert(CT obj) { try { int id = PostgreHelper.InsertSingleEntity <CT>(obj); return(id); } catch (Exception ex) { Console.WriteLine(ex.Message); } return(-1); }
//插入数据 public int Insert(line_info obj) { try { //string sql = "Insert into fimp.line_info(plant_id,dept_id,unit_no,line_name_en,line_name_tw,line_name_cn,story,status_no)values({0},-1,'{1}','{2}',N'{3}',N'{4}',N'{5}','{6}')"; //sql = string.Format(sql, obj.plant_id, obj.unit_no, obj.line_name_en, obj.line_name_tw, obj.line_name_cn, obj.story, obj.status_no); int count = PostgreHelper.InsertSingleEntity <line_info>(obj); return(count); } catch (Exception ex) { throw ex; } }
//插入数据 public int Insert(material_request_info obj) { try { string sql = "Insert into fimp.material_request_info(material_id,station_id,request_person_id,work_order,part_num,request_count,take_person_id,take_time,remark,createtime FROM fimp.material_request_info)values({0},{1},{2},N'{3}',N'{4}',{5},{6},'{7}','{8}','{9}')"; sql = string.Format(sql, obj.material_id, obj.station_id, obj.request_person_id, obj.work_order, obj.part_num, obj.request_count, obj.take_person_id, obj.take_time, obj.remark, obj.createtime); //int count = PostgreHelper.ExecuteNonQuery(sql); int count = PostgreHelper.InsertSingleEntity <material_request_info>(obj); return(count); } catch (Exception ex) { throw ex; } }
///// <summary> ///// 查询单笔数 ///// </summary> ///// <param name="id">用户id</param> ///// <returns></returns> //public Setting SelectInUse(int all_type) //{ // try // { // Setting obj = new Setting(); // string sql = "select * from jinchen.setting where in_use=1 and all_type={0}"; // sql = string.Format(sql, all_type); // obj = PostgreHelper.GetSingleEntity<Setting>(sql); // return obj; // } // catch (Exception ex) // { // throw ex; // } //} /// <summary> /// 插入 /// </summary> /// <param name="obj"></param> /// <returns></returns> public int Insert(Setting obj) { try { Setting setting = new Setting(); setting.config_list = obj.config_list; setting.all_type = obj.all_type; setting.in_use = obj.in_use; int count = PostgreHelper.InsertSingleEntity <Setting>("jinchen.setting", setting); return(count); } catch (Exception ex) { throw ex; } }
/// <summary> /// 执行插入人员信息方法 /// </summary> /// <param name="obj"></param> /// <returns>影响行数</returns> public int Insert(user obj) { try { user newUser = new user(); newUser.user_name = obj.user_name; newUser.user_level = obj.user_level; newUser.pass_word = SS.Base64Encryption(Encoding.UTF8, obj.pass_word); newUser.create_time = obj.create_time; newUser.dept_id = obj.dept_id; int count = PostgreHelper.InsertSingleEntity <user>(newUser); return(count); } catch (Exception ex) { throw ex; } }
/// <summary> /// 执行插入人员信息方法 /// </summary> /// <param name="obj"></param> /// <returns>影响行数</returns> public int Insert(User obj) { try { User newUser = new User(); newUser.user_name = obj.user_name; newUser.level = obj.level; newUser.level_name = obj.level_name; newUser.pass_word = SS.Base64Encryption(Encoding.UTF8, obj.pass_word); newUser.createtime = DateTime.Now.ToLocalTime(); int count = PostgreHelper.InsertSingleEntity <User>("jinchen.user_info", newUser); return(count); } catch (Exception ex) { throw ex; } }
/// <summary> /// 插入 /// </summary> /// <param name="obj"></param> /// <returns></returns> public int Insert(Contact obj) { try { Contact customer = new Contact(); customer.name = obj.name; customer.position = obj.position; customer.telephone = obj.telephone; customer.email = obj.email; customer.customer_id = obj.customer_id; int count = PostgreHelper.InsertSingleEntity <Contact>("jinchen.customer_info", customer); return(count); } catch (Exception ex) { throw ex; } }
/// <summary> /// 插入 /// </summary> /// <param name="obj"></param> /// <returns></returns> public int Insert(Company obj) { try { Company company = new Company(); company.company_name = obj.company_name; company.tax_num = obj.tax_num; company.account = obj.account; company.bank = obj.bank; company.address = obj.address; company.company_type = obj.company_type; int count = PostgreHelper.InsertSingleEntity <Company>("jinchen.company_info", company); return(count); } catch (Exception ex) { throw ex; } }
/// <summary> /// 插入 /// </summary> /// <param name="obj"></param> /// <returns></returns> public int Insert(Invoice obj) { try { Invoice invoice = new Invoice(); invoice.company_name = obj.company_name; invoice.invoice_company = obj.invoice_company; invoice.invoice_type = obj.invoice_type; invoice.invoice_index = obj.invoice_index; invoice.invoice_time = obj.invoice_time; invoice.invoice_price = obj.invoice_price; invoice.invoice_real_price = obj.invoice_real_price; invoice.invoice_prepay = obj.invoice_prepay; invoice.pay_type = obj.pay_type; invoice.remark = obj.remark; int count = PostgreHelper.InsertSingleEntity <Invoice>("jinchen.invoice_info", invoice); return(count); } catch (Exception ex) { throw ex; } }
public int Insert(srp_inner_log Obj) { int count = PostgreHelper.InsertSingleEntity <srp_inner_log>(Obj); return(count); }
public int Insert(error_log_person Obj) { int id = PostgreHelper.InsertSingleEntity <error_log_person>(Obj); return(id); }
public int Insert(error_config Obj) { int count = PostgreHelper.InsertSingleEntity <error_config>(Obj); return(count); }
public int Insert(error_config_person Obj, bool RetId = false) { int count = PostgreHelper.InsertSingleEntity <error_config_person>(Obj); return(count); }