/// <summary> /// 判断是否配置数据统计 /// </summary> /// <returns></returns> public bool ObjectIsConfig(ReportQueryModel model, out int objectid) { objectid = 0; IObjectConfig dal = DataSwitchConfig.CreateObjectConfig(); SqlParameter[] parameter = { new SqlParameter("@objectid", SqlDbType.NVarChar), new SqlParameter("@itemcodeid", SqlDbType.Int), new SqlParameter("@unit", SqlDbType.Int), new SqlParameter("@objecttype", SqlDbType.Int) }; parameter[0].Value = model.objectid; parameter[1].Value = model.itemcode; parameter[2].Value = CommDataTool.ConvertBaseCountType(model.unit); parameter[3].Value = model.objecttype; DataTable becmcountdt = dal.GetList(" objectid=@objectid and objecttype=@objecttype and itemcodeid=@itemcodeid and unit=@unit", "objectid", parameter); if (becmcountdt.Rows.Count.Equals(0)) { return(false); } objectid = int.Parse(becmcountdt.Rows[0][0].ToString()); return(true); }
public int GetUserGroupID(string username) { IAccessCommon dalCommon = DataSwitchConfig.CreateAccessCommon(); return(dalCommon.GetUserGroupID(username)); }