Example #1
0
        public string getRole(string MID)
        {
            string            storedProc = "sp_getRole";
            DynamicParameters param      = new DynamicParameters();

            param.Add("@MID", MID);
            string role = (string)dao.ExecuteScalar(System.Data.CommandType.StoredProcedure, sql: storedProc, parameters: param);

            return(role);
        }
Example #2
0
        public string getTokenStatus(string GUID, int MetaActive)
        {
            string sqlQuery = "sp_getTokenStatus";

            DynamicParameters param = new DynamicParameters();

            param.Add("@GUID", GUID);
            param.Add("@MetaActive", MetaActive);

            return(dao.ExecuteScalar(commandType: System.Data.CommandType.StoredProcedure, sql: sqlQuery, parameters: param).ToString());
        }
Example #3
0
        public string CheckAssetMIDMapping(int MID, int AssetID)
        {
            string            sqlQuery = "sp_CheckAssetMIDMapping";
            DynamicParameters param    = new DynamicParameters();

            param.Add("@AssetID", AssetID);
            param.Add("@MID", MID);
            param.Add("@return", dbType: System.Data.DbType.String, direction: System.Data.ParameterDirection.Output, size: 5215585);

            dao.ExecuteScalar(commandType: System.Data.CommandType.StoredProcedure, sql: sqlQuery, parameters: param);
            string exists = param.Get <string>("return");

            return(exists);
        }
Example #4
0
        public string SRCreatorMail(int SRID)
        {
            string query = "select EmailId from Users where id in ( Select user_id from ServiceRequest where id =" + SRID + ")";

            return((string)dao.ExecuteScalar(System.Data.CommandType.Text, query));
        }
 public object ExecuteScalar(string sql)
 {
     return(dapper.ExecuteScalar(sql, CommandType.Text));
 }