public virtual string GetId(KeyValuePair <string, object> parameter) { List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> > { parameter }; return(DbCommonLibary.GetProperty(DBProvider, this.CurrentTableName, parameters, BusinessLogic.FieldId)); }
public virtual string GetProperty(KeyValuePair <string, object> parameter, string targetField) { List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> > { parameter }; return(DbCommonLibary.GetProperty(DBProvider, this.CurrentTableName, parameters, targetField)); }
public virtual string GetProperty(object id, string targetField) { List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> > { new KeyValuePair <string, object>(BusinessLogic.FieldId, id) }; return(DbCommonLibary.GetProperty(DBProvider, this.CurrentTableName, parameters, targetField)); }
public DataTable GetChildrenStaffs(string organizeId) { PiOrganizeManager organizeManager = new PiOrganizeManager(this.DBProvider, this.UserInfo); string[] organizeIds = null; switch (DBProvider.CurrentDbType) { case CurrentDbType.Access: case CurrentDbType.SqlServer: string organizeCode = DbCommonLibary.GetProperty(dbProvider, PiOrganizeTable.TableName, PiOrganizeTable.FieldId, organizeId, PiOrganizeTable.FieldCode); //this.GetCodeById(organizeId); organizeIds = organizeManager.GetChildrensIdByCode(PiOrganizeTable.FieldCode, organizeCode); break; case CurrentDbType.Oracle: organizeIds = organizeManager.GetChildrensId(PiOrganizeTable.FieldId, organizeId, PiOrganizeTable.FieldParentId); break; case CurrentDbType.MySql: organizeIds = organizeManager.GetMySqlChildrensId(PiOrganizeTable.FieldId, organizeId, PiOrganizeTable.FieldParentId); break; } return(this.GetDTByOrganizes(organizeIds)); }
/// <summary> /// 获取角色名称 /// </summary> /// <param name="id">主键</param> /// <returns>主键</returns> public string GetRoleName(string id) { var roleId = this.GetProperty(id, PiUserRoleTable.FieldRoleId); return(DbCommonLibary.GetProperty(DBProvider, PiRoleTable.TableName, PiRoleTable.FieldId, roleId, PiRoleTable.FieldRealName)); }
/// <summary> /// 获取员工名称 /// </summary> /// <param name="id">主键</param> /// <returns>主键</returns> public string GetUserFullName(string id) { var userId = this.GetProperty(id, PiUserRoleTable.FieldUserId); return(DbCommonLibary.GetProperty(DBProvider, PiStaffTable.TableName, PiStaffTable.FieldId, userId, PiStaffTable.FieldRealName)); }
/// <summary> /// 获得主键 /// </summary> /// <param name="names">字段数组</param> /// <param name="values">字段值数组</param> /// <returns>对应的值</returns> public virtual string GetId(string[] names, object[] values) { return(DbCommonLibary.GetProperty(DBProvider, this.CurrentTableName, names, values, BusinessLogic.FieldId)); }
/// <summary> /// 获得主键 /// </summary> /// <param name="name1">字段名1</param> /// <param name="value1">字段值1</param> /// <param name="name2">字段名2</param> /// <param name="value2">字段值2</param> /// <returns>对应的值</returns> public virtual string GetId(string name1, object value1, string name2, object value2) { return(DbCommonLibary.GetProperty(DBProvider, this.CurrentTableName, name1, value1, name2, value2, BusinessLogic.FieldId)); }
/// <summary> /// 获取主键 /// </summary> /// <param name="code">编号</param> /// <returns>主键</returns> public virtual string GetIdByCode(string code) { return(DbCommonLibary.GetProperty(DBProvider, this.CurrentTableName, BusinessLogic.FieldCode, code, BusinessLogic.FieldId)); }
/// <summary> /// 获取编码 /// </summary> /// <param name="id">主键</param> /// <returns>编号</returns> public virtual string GetCodeById(string id) { return(DbCommonLibary.GetProperty(DBProvider, this.CurrentTableName, BusinessLogic.FieldId, id, BusinessLogic.FieldCode)); }
public virtual string GetId(params KeyValuePair <string, object>[] parameters) { List <KeyValuePair <string, object> > parameterList = parameters.ToList(); return(DbCommonLibary.GetProperty(DBProvider, this.CurrentTableName, parameterList, BusinessLogic.FieldId)); }
public virtual string GetProperty(string[] names, object[] values, string targetField) { return(DbCommonLibary.GetProperty(DBProvider, this.CurrentTableName, names, values, targetField)); }
public virtual string GetProperty(string name1, object value1, string name2, object value2, string targetField) { return(DbCommonLibary.GetProperty(DBProvider, this.CurrentTableName, name1, value1, name2, value2, targetField)); }