public List<EmployTypeOR> selectEmployTypeData(string orgbhWhere) { if (string.IsNullOrEmpty(orgbhWhere)) return null; string sql = @"select bu.* from t_EmployType bu inner join t_Bank b on b.orgbh= bu.orgbh where " + orgbhWhere; DataTable dt = null; try { dt = dbMsSql.ExecuteQuery(sql); } catch (Exception ex) { throw ex; } if (dt == null) return null; List<EmployTypeOR> listEmpl = new List<EmployTypeOR>(); foreach (DataRow dr in dt.Rows) { EmployTypeOR obj = new EmployTypeOR(dr); listEmpl.Add(obj); } return listEmpl; }
/// <summary> /// 获取插入数据 /// </summary> public string GetInsertSql(EmployTypeOR employType) { string sql = @"insert into t_EmployType (Id,Name,Description,OrgBH) values ('@Id','@Name','@Description','@OrgBH')"; sql = sql.Replace("@Id", employType.Id); // sql = sql.Replace("@Name", employType.Name); //柜员类型名称,如普通柜员、高级柜员、个人业务顾问等 sql = sql.Replace("@Description", employType.Description); //描述 sql = sql.Replace("@OrgBH", employType.Orgbh); // return sql; }